How do i display full information on a kubernetes service?



  • We can use the kubectl describe command to display full information on a kubernetes service.

    Also see: https://www.lightnetics.com/post/10283

    $ kubectl describe svc web-service    
    Name:                     web-service
    Namespace:                default
    Labels:                   run=web-service
    Annotations:              <none>
    Selector:                 app=nginx
    Type:                     NodePort
    IP:                       10.96.232.44
    Port:                     <unset>  80/TCP
    TargetPort:               80/TCP
    NodePort:                 <unset>  30862/TCP
    Endpoints:                172.17.0.10:80,172.17.0.11:80,172.17.0.9:80
    Session Affinity:         None
    External Traffic Policy:  Cluster
    Events:                   <none>
    

    Here we see NodePort 30862 maps to port 80. The selector is app=nginx, and the three endpoints.


Log in to reply
 

© Lightnetics 2024