If i create a nginx pod and expose it’s 80 port:
k run nginx --image nginx --expose --port 80
it coudn’t be achieved from the same namespace another pod via curl. On the v1.24 labs it works as expected (didnt’ try for v1.24 playground)
If i create a nginx pod and expose it’s 80 port:
k run nginx --image nginx --expose --port 80
it coudn’t be achieved from the same namespace another pod via curl. On the v1.24 labs it works as expected (didnt’ try for v1.24 playground)
Hello @rostergek,
How did you verify the curl command? Can you share your screenshot?
Thanks,
Trung.
I just tried and confirm it worked.
Create nginx-pod
trungtran@k8scommunity ~ % kubectl run nginx-pod --image=nginx --expose --port=80
service/nginx-pod created
Create another nginx in the same namespace
trungtran@k8scommunity ~ % kubectl run nginx-pod3 --image=nginx
pod/nginx-pod3 created
Try curl
command
trungtran@k8scommunity ~ % kubectl exec -it nginx-pod 3 -- curl nginx-pod
<!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>
Thanks,
Trung.