pod ? 컨테이너를 실행 및 그룹화함.
* pods 정보1(세부)
입력 : kubectl get pods -o wide
출력
NAME READY STATUS RESTARTS AGE IP
hello-world-rest-api-569c4879d9-j8sd8 1/1 Running 0 23h 10.68.2.6
NODE NOMINATED NODE READINESS GATES
gke-in28minutes-cluster-default-pool-1470c56f-4bw7 <none> <none>
* pod 정보 2(간략)
입력 : kubectl get pods
출력
NAME READY STATUS RESTARTS AGE
hello-world-rest-api-569c4879d9-j8sd8 1/1 Running 0 23h
* pod 정보 3(세부)
입력 : kubectl describe pod hello-world-rest-api-569c4879d9-j8sd8
(pod1,2의 name 복사한 후 kubectl describe pod 뒤에 붙히기.)
출력
NAME READY STATUS RESTARTS AGE
hello-world-rest-api-569c4879d9-j8sd8 1/1 Running 0 23h
wjdtngus9@cloudshell:~$ kubectl describe pod hello-world-rest-api-569c4879d9-j8sd8
Name: hello-world-rest-api-569c4879d9-j8sd8
Namespace: default
Priority: 0
Service Account: default
Node: gke-in28minutes-cluster-default-pool-1470c56f-4bw7/10.128.0.12
Start Time: Tue, 03 Jan 2023 17:36:17 +0000
Labels: app=hello-world-rest-api
pod-template-hash=569c4879d9
Annotations: <none>
Status: Running
IP: 10.68.2.6
....
* pod 설명
입력 : kubectl explain pods
출력 :
DESCRIPTION:
Pod is a collection of containers that can run on a host. This resource is
created by clients and scheduled onto hosts.
...
*pod 삭제
입력 : kubectl delete pods hello-world-rest-api-569c4879d9-j8sd8 (kubectl get pods -o wide 의 name 을 입력.)
출력 : pod "hello-world-rest-api-569c4879d9-j8sd8" deleted
'CICD' 카테고리의 다른 글
[Kubernetes] replicaset 관련 명령어 (0) | 2023.01.05 |
---|