controlplane ~ ➜ k get pod newpods-gjfh4 -o yaml | grep image
image: busybox
imagePullPolicy: Always
image: docker.io/library/busybox:latest
imageID: docker.io/library/busybox@sha256:05a79c7279f71f86a2a0d05eb72fcb56ea36139150f0a75cd87e80a4272e4e39
controlplane ~ ➜ k describe pod newpods-gjfh4 | grep image
Normal Pulling 3m4s kubelet Pulling image "busybox"
Normal Pulled 3m2s kubelet Successfully pulled image "busybox" in 1.887974613s
controlplane ~ ✖ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx 1/1 Running 0 12m 10.42.0.9 controlplane <none> <none>
newpods-gjfh4 1/1 Running 0 11m 10.42.0.11 controlplane <none> <none>
newpods-qf5hl 1/1 Running 0 11m 10.42.0.12 controlplane <none> <none>
newpods-x9fcg 1/1 Running 0 11m 10.42.0.10 controlplane <none> <none>
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis123 ## 잘못된 이미지 입력
controlplane ~ ➜ kubectl apply -f redis.yaml
pod/redis created
controlplane ~ ➜ kubectl get pod redis
NAME READY STATUS RESTARTS AGE
redis 0/1 ImagePullBackOff 0 27s
apiVersion: v1
kind: Pod
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"redis","namespace":"default"},"spec":{"containers":[{"image":"redis123","name":"redis"}]}}
creationTimestamp: "2022-12-24T13:52:43Z"
name: redis
namespace: default
resourceVersion: "976"
uid: 61e293ac-44b8-40c7-aa7a-7df4afba330b
spec:
containers:
- image: redis # redis123 -> redis 수정
imagePullPolicy: Always
name: redis
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
... 생략
수정 후 STATUS Running 확인
controlplane ~ ➜ kubectl edit pod redis
pod/redis edited
controlplane ~ ➜ kubectl get pod redis
NAME READY STATUS RESTARTS AGE
redis 1/1 Running 0 5m15s
열심히시네요! 멋있어요!