Q: 17
We have an external webserver running on student-node which is exposed at port 9999. We have created a service called external-webserver-cka03-svcn that can connect to our local webserver from within the kubernetes cluster3 but at the moment it is not working as expected.
Fix the issue so that other pods within cluster3 can use external-webserver-cka03-svcn service to access the webserver.
Many times I solved this problem correctly.
That time a external service was automatically create in respective cluster(cluster3)
so I can solve that,
but now the external service not creating automatically.
please check this issue. Whether i am wrong or have any system issue.
You’re the second person today to ask about the same two questions
The external service appears to be present:
student-node ~ ✖ netstat -tunl | grep 9999
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN
student-node ~ ➜ curl http://localhost:9999
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
So it is set up slightly differently from the original version of this question
The existing service is connected to a pod in the cluster. You need to remove that association and instead connect it to the external service via an Endpoint
You don’t need to SSH anywhere to do this, it can all be done from student-node
I don’t really think it matters what namespace it is in. The point is to simply connect the service, as you know how to solve it when you know where the service is.
All the question states is that there is a service external-webserver-cka03-svcn, but not where to find it. That is an exercise for the student.