kubectl get all

1 개요[ | ]

kubectl get all
  • 모든(all) 객체를 조회하는 kubectl 명령어라는 의미이지만...
실제로는 pod, service, deployment, replicaset 정도가 조회된다.
예를 들어 pvc, ingress 등은 조회되지 않는다.
  • 또한 옵션을 주지 않으면 default 네임스페이스만 조회한다.
Console
Copy
$ kubectl get all
NAME                                 READY   STATUS    RESTARTS   AGE
pod/tiller-deploy-5cbc779596-qrthl   2/2     Running   0          9h

NAME                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE
service/external             ClusterIP   10.110.2.55     <none>        80/TCP      1h
service/external-myapp       ClusterIP   10.110.14.103   <none>        80/TCP      43m
service/external-mymarkers   ClusterIP   10.110.5.216    <none>        80/TCP      43m
service/kubernetes           ClusterIP   10.110.0.1      <none>        443/TCP     24d
service/tiller-deploy        ClusterIP   10.110.10.3     <none>        44134/TCP   4d

NAME                            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/tiller-deploy   1         1         1            1           9h

NAME                                       DESIRED   CURRENT   READY   AGE
replicaset.apps/tiller-deploy-5cbc779596   1         1         1       9h

NAME                                              REFERENCE                TARGETS         MINPODS   MAXPODS   REPLICAS   AGE
horizontalpodautoscaler.autoscaling/istio-pilot   Deployment/istio-pilot   <unknown>/80%   1         5         0          24d

2 예시[ | ]

Console
Copy
master:~$ kubectl get all
NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   12s
Console
Copy
master:~$ kubectl create deployment nginx --image=nginx
deployment.apps/nginx created
Console
Copy
master:~$ kubectl get all
NAME                         READY   STATUS    RESTARTS   AGE
pod/nginx-65f88748fd-rqgm2   1/1     Running   0          25s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   48s

NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   1/1     1            1           25s

NAME                               DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-65f88748fd   1         1         1       25s
Console
Copy
master:~$ kubectl get pod,svc,deploy,rs
NAME                         READY   STATUS    RESTARTS   AGE
pod/nginx-65f88748fd-rqgm2   1/1     Running   0          41s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   64s

NAME                          READY   UP-TO-DATE   AVAILABLE   AGE
deployment.extensions/nginx   1/1     1            1           41s

NAME                                     DESIRED   CURRENT   READY   AGE
replicaset.extensions/nginx-65f88748fd   1         1         1       41s

3 같이 보기[ | ]

4 참고[ | ]