Editing Kubectl get services

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
  [[kubectl get]] [[svc]]
+
  [[kubectl get]] svc
  [[kubectl get svc -A]]
+
  [[kubectl get]] svc -o [[json]]
[[kubectl get svc -o json]]
 
[[kubectl get svc -n monitoring]]
 
 
 
TYPE: [[ClusterIP]], [[LoadBalancer]], [[NodePort]]
 
 
 
kubectl get services
 
NAME        TYPE        CLUSTER-IP  EXTERNAL-IP  PORT(S)  AGE
 
kubernetes  [[ClusterIP]]   172.20.0.1  <none>        443/TCP  7d20h
 
  
 
  [[kubectl get]] services
 
  [[kubectl get]] services
  NAME                                    TYPE        [[CLUSTER-IP]]       [[EXTERNAL-IP]]         PORT(S)              AGE
+
  NAME                                    TYPE        CLUSTER-IP      EXTERNAL-IP          PORT(S)              AGE
 
  YOUR_SERVICE_NAME                  [[ClusterIP]]  None            <none>                1130/TCP            29h
 
  YOUR_SERVICE_NAME                  [[ClusterIP]]  None            <none>                1130/TCP            29h
 
  [[consul]]-dns                        [[ClusterIP]]  10.172.23.56 <none>                53/TCP,53UDP        29h   
 
  [[consul]]-dns                        [[ClusterIP]]  10.172.23.56 <none>                53/TCP,53UDP        29h   
  
k get svc
+
  kubectl -n [[nginx-ingress]] get sv
NAME                                    TYPE          CLUSTER-IP      EXTERNAL-IP                                                             
 
PORT(S)                      AGE
 
kubernetes                              [[ClusterIP]]      172.20.0.1      <none>                                                                   
 
443/TCP                      16d
 
my-ingress-nginx-controller            LoadBalancer  172.20.113.54  a2342354353456345ab-434234.us-east-1.elb.amazonaws.com  80:32520/TCP,443:31939/TCP  13m
 
my-ingress-nginx-controller-admission  ClusterIP      172.20.29.138  <none>                                                                   
 
443/TCP                      13m
 
my-mariadb                              ClusterIP      172.20.157.59  <none>                                                                   
 
3306/TCP                    15d
 
 
 
 
 
  kubectl -n [[nginx-ingress]] get svc
 
 
  NAME            TYPE          CLUSTER-IP      EXTERNAL-IP                              PORT(S)                              AGE
 
  NAME            TYPE          CLUSTER-IP      EXTERNAL-IP                              PORT(S)                              AGE
 
  [[nginx-ingress]]  [[LoadBalancer]]  10.100.100.2  xxxx70yyyy.[[us-west-1]].elb.amazonaws.com    80:31982/TCP,443:30529/TCP            8d
 
  [[nginx-ingress]]  [[LoadBalancer]]  10.100.100.2  xxxx70yyyy.[[us-west-1]].elb.amazonaws.com    80:31982/TCP,443:30529/TCP            8d
  
 
[[Ports]]:
 
[[Ports]]:
  kubectl get svc --all-namespaces -o json | jq '.items[] | {name:.metadata.name, p:.spec.ports[] } | select( .p.nodePort != null ) | "\(.name): localhost:\(.p.nodePort) -> \(.p.port) -> \(.p.targetPort)"'  
+
  kubectl get svc --all-namespaces -o json | jq '.items[] | {name:.metadata.name, p:.spec.ports[] } | select( .p.nodePort != null ) | "\(.name): localhost:\(.p.nodePort) -> \(.p.port) -> \(.p.targetPort)"'                                                                                                                                                                                                                                                                                        
 
 
[[kubectl get]] service [[kube-dns]] -n [[kube-system]]
 
NAME      TYPE        CLUSTER-IP    EXTERNAL-IP  PORT(S)        AGE
 
kube-dns  ClusterIP  10.100.0.10  <none>        53/UDP,53/TCP  3h52m
 
 
 
[[kubectl -n kube-system]] get [[endpoints]] kube-dns
 
NAME      ENDPOINTS  AGE
 
kube-dns  <none>      3h55m
 
                                                                                                                                                                                                                                                                                     
 
  
 
== [[Minikube]] ==
 
== [[Minikube]] ==
Line 81: Line 52:
 
  NAME        TYPE        CLUSTER-IP  [[EXTERNAL-IP]]  PORT(S)  AGE
 
  NAME        TYPE        CLUSTER-IP  [[EXTERNAL-IP]]  PORT(S)  AGE
 
  kubernetes  ClusterIP  172.20.0.1  <none>        443/TCP  14m
 
  kubernetes  ClusterIP  172.20.0.1  <none>        443/TCP  14m
 
[[kubectl get]] services -A
 
NAMESPACE    NAME        TYPE        CLUSTER-IP  [[EXTERNAL-IP]]  PORT(S)        AGE
 
default      kubernetes  ClusterIP  172.20.0.1  <none>        443/TCP        14m
 
kube-system  kube-dns    ClusterIP  172.20.0.10  <none>        53/UDP, 53/TCP  14m
 
  
 
EKS after installing grafana:
 
EKS after installing grafana:
Line 99: Line 65:
 
  metrics-server                    ClusterIP  172.20.94.132  <none>        443/TCP  26h
 
  metrics-server                    ClusterIP  172.20.94.132  <none>        443/TCP  26h
 
  my-release-kubernetes-dashboard  ClusterIP  172.20.8.159    <none>        443/TCP  26h
 
  my-release-kubernetes-dashboard  ClusterIP  172.20.8.159    <none>        443/TCP  26h
 
[[kubectl get]] svc  -n prod
 
NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP  PORT(S)          AGE
 
your-app                        ClusterIP  10.100.125.208  <none>        443/TCP                44h
 
cm-acme-http-solver-3kz7z      NodePort    10.100.125.22    <none>        8089:32023/TCP        44h
 
elasticsearch-master            ClusterIP  10.100.67.254    <none>        9200/TCP,9300/TCP      6d22h
 
elasticsearch-master-headless  ClusterIP  None            <none>        9200/TCP,9300/TCP      6d22h
 
your-api                        NodePort    10.100.3.113    <none>        80:30634/TCP          44h
 
  
 
== Related terms ==
 
== Related terms ==
Line 113: Line 71:
 
* <code>[[kubectl proxy]]</code>
 
* <code>[[kubectl proxy]]</code>
 
* <code>[[kind]]: [[Service]]</code>
 
* <code>[[kind]]: [[Service]]</code>
* <code>[[kubectl get endpoints -A]]</code>
+
* <code>[[kubectl get endpoints]]</code>
 
* <code>[[kubectl get ServiceAccount]]</code>
 
* <code>[[kubectl get ServiceAccount]]</code>
* <code>[[kubectl get ingress]]</code>
 
* [[kubectl describe services]]
 
  
 
== See also ==
 
== See also ==
 +
* {{kubectl get}}
 
* {{Kubernetes services}}
 
* {{Kubernetes services}}
 +
  
 
[[Category:Kubernetes]]
 
[[Category:Kubernetes]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page:

Advertising: