Kubernetes Notes
Step-1 Create a pod1.yml for ubuntu and nginx:
Step-2 Create pod2.yml ans simply use image ubuntu:
Step-3 Create a service of ClusterIP and apply it on pod1 and pod2:
Step-4 Now Check your Cluster IP try to access Nginx and than enter into ubuntu container and try to access nginx of Pod1:
So Ip is 10.105.109.243 Now try to access it :
Now try to access it from Ubuntu Container:
Now Simply Delete this service and use Nodeport service instead of using this:
Now put Node instance ip into browser with assign port 30931 :
so you will access it 13.208.172.239:30931
Nore: In service.yml target port will be those port where nginx service will run and the port which it assign like 30931 is that port from which i can use nginx service, so in service.yml you prefer to chose target port those on which your nginx usually run or any other application.