Difference between revisions of "Kubectl describe services"

From wikieduonline
Jump to navigation Jump to search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
  [[kubectl describe]] services
 +
  kubectl describe service -A
  
 +
[[kubectl describe]] service | grep [[Type]]
 +
 +
== Examples ==
 +
 +
=== [[ClusterIP]] ===
 
  [[kubectl describe]] services
 
  [[kubectl describe]] services
 
  Name:              kubernetes
 
  Name:              kubernetes
Line 9: Line 16:
 
  Selector:          <none>
 
  Selector:          <none>
 
  Type:              ClusterIP
 
  Type:              ClusterIP
  IP Family Policy:  SingleStack
+
  IP Family Policy:  [[SingleStack]]
 
  IP Families:      IPv4
 
  IP Families:      IPv4
 
  IP:                10.100.0.1
 
  IP:                10.100.0.1
Line 19: Line 26:
 
  Events:            <none>
 
  Events:            <none>
  
  kubectl describe service -A
+
  .../...
 +
Endpoints:                10.2.1.89:3000
 +
Session Affinity:        None
 +
External Traffic Policy:  Cluster
 +
Events:
 +
  Type    Reason                Age    From                Message
 +
  ----    ------                ----  ----                -------
 +
  Normal  EnsuringLoadBalancer  9m17s  service-controller  Ensuring load balancer
 +
  Normal  EnsuredLoadBalancer  9m15s  service-controller  Ensured load balancer
 +
 
 +
=== [[LoadBalancer]] ===
 +
<pre>
 +
Name:                    mylbinm
 +
Namespace:                default
 +
Labels:                  app.kubernetes.io/instance=instance-name
 +
                          app.kubernetes.io/managed-by=Helm
 +
                          app.kubernetes.io/name=your-app-name
 +
                          app.kubernetes.io/version=your-tag-versoin
 +
                          helm.sh/chart=inm-dev-0.1.0
 +
Annotations:              <none>
 +
Selector:                app.kubernetes.io/instance=instance-name,app.kubernetes.io/name=your-app-name
 +
Type:                    LoadBalancer
 +
IP Family Policy:        SingleStack
 +
IP Families:              IPv4
 +
IP:                      172.20.218.205
 +
IPs:                      172.20.218.205
 +
LoadBalancer Ingress:    a71b8bc0xxxxxx.us-east-2.elb.amazonaws.com
 +
Port:                    <unset>  3000/TCP
 +
TargetPort:              3000/TCP
 +
NodePort:                <unset>  30057/TCP
 +
Endpoints:                10.33.1.97:3000
 +
Session Affinity:        None
 +
External Traffic Policy:  Cluster
 +
Events:                  <none>
 +
</pre>
  
  
  
 +
== Related ==
 +
* <code>[[kubectl expose deployment]] hello-world --type=LoadBalancer --name=my-service</code>
  
 
== See also ==
 
== See also ==
 +
* {{kubectl describe service}}
 +
* {{kubectl create service}}
 +
* {{kind: Service}}
 
* {{Kubernetes services}}
 
* {{Kubernetes services}}
* {{Ingress}}
+
 
  
 
[[Category:Kubernetes]]
 
[[Category:Kubernetes]]

Latest revision as of 17:49, 15 February 2024

 kubectl describe services
 kubectl describe service -A
kubectl describe service | grep Type

Examples[edit]

ClusterIP[edit]

kubectl describe services
Name:              kubernetes
Namespace:         default
Labels:            component=your-label
                   provider=kubernetes
Annotations:       <none>
Selector:          <none>
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.100.0.1
IPs:               10.100.0.1
Port:              https  443/TCP
TargetPort:        443/TCP
Endpoints:         192.168.104.103:443,192.168.181.204:443
Session Affinity:  None
Events:            <none>
.../...
Endpoints:                10.2.1.89:3000
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type    Reason                Age    From                Message
  ----    ------                ----   ----                -------
  Normal  EnsuringLoadBalancer  9m17s  service-controller  Ensuring load balancer
  Normal  EnsuredLoadBalancer   9m15s  service-controller  Ensured load balancer

LoadBalancer[edit]

Name:                     mylbinm
Namespace:                default
Labels:                   app.kubernetes.io/instance=instance-name
                          app.kubernetes.io/managed-by=Helm
                          app.kubernetes.io/name=your-app-name
                          app.kubernetes.io/version=your-tag-versoin
                          helm.sh/chart=inm-dev-0.1.0
Annotations:              <none>
Selector:                 app.kubernetes.io/instance=instance-name,app.kubernetes.io/name=your-app-name
Type:                     LoadBalancer
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       172.20.218.205
IPs:                      172.20.218.205
LoadBalancer Ingress:     a71b8bc0xxxxxx.us-east-2.elb.amazonaws.com
Port:                     <unset>  3000/TCP
TargetPort:               3000/TCP
NodePort:                 <unset>  30057/TCP
Endpoints:                10.33.1.97:3000
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>


Related[edit]

See also[edit]

Advertising: