"Kubectl run"의 두 판 사이의 차이

 
47번째 줄: 47번째 줄:
* [[kubectl get nodes]]
* [[kubectl get nodes]]
* [[kubectl get deployments]]
* [[kubectl get deployments]]
* [[k8s pod 생성하기]]
* [[nginx pod 생성하기]]
* [[nginx pod 생성하기]]
* [[docker run]]
* [[docker run]]

2025년 6월 21일 (토) 13:49 기준 최신판

1 개요[ | ]

kubectl run
$ kubectl run redis --image=redis
deployment.apps/redis created
$ kubectl get pod
NAME                    READY     STATUS              RESTARTS   AGE
redis-bb7894d65-4k8tm   0/1       ContainerCreating   0          6s
$ kubectl get pod
NAME                    READY     STATUS    RESTARTS   AGE
redis-bb7894d65-4k8tm   1/1       Running   0          10s
$ kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
deployment.apps/kubernetes-bootcamp created
$ kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
Error from server (AlreadyExists): deployments.apps "kubernetes-bootcamp" already exists
$ kubectl run pod1 --image=nginx --dry-run=client -oyaml
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: pod1
  name: pod1
spec:
  containers:
  - image: nginx
    name: pod1
    resources: {}
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}