apiVersion:v1
kind:Pod
metadata:
name:freebox
spec:
containers:
-name:busybox
image:busybox:latest
imagepullPolicy:IfNotPresent
当apply 这个yaml文件后,为什么运行kubectl get pod freebox ,发现freebox没有运行?
你需要在pod中运行一个常驻进程,比如sleep 3600,命令如下:
kubectl run busybox --image=busybox -- sleep 3600