Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

ClusterIP commands & NodePort

Sumit Rawal answered on May 6, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • nodejs cluster
  • ClusterIP
  • ClusterIP
  • type: ClusterIP
  • What Is ClusterIP?
  • Backend Service: (ClusterIP type )
  • ClusterIP#
  • clusterip-service.yaml
  • The port exposed by the ClusterIP type service is

  • ClusterIP commands & NodePort

    0

    Commands:

    1. kubectl apply -f filename.yaml

    2. To see all resource is running or not: kubectl get all

    3. kubectl get pod -o wide

    4. Copy the httpddeployment pod IP i.e. 172.17.0.7

    5. Now go inside the ubuntu pod

    6. And run apt update && apt install curl -y

    7. Run "curl 172.17.0.7:80" and you will get output.

    8. Run "curl clusterIP:80 i.e. curl 10.104.84.124:80 "

    9. Now you hit via the pod IP and it's working

    10. But if someone delete the pod or due to any reason the pod terminated

    11. Then pod will get new IP and if you hit the command again with old pod IP then it will not give any output

    12. Now we copy the Cluster Ip and again go inside the ubuntu pod

    13. kubectl exec -it pod/ubuntudeployment-594f56844c-4w6sk -- /bin/bash

    14. Now run "curl clusterIP:80 i.e curl 10.104.84.124:80 "

    15. It will work same

    16. So now we not need to worry about POD IP. 

    Popularity 1/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Tags: javascript
    Link to this answer
    Share Copy Link
    Contributed on May 06 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.