默认busybox容器创建后的状态为completed,需要增加持续运行的参数,以方便进行容器测试工作.
[root@k8s-master-10 yml]# cat busybox-pod.yml
apiVersion: v1
kind: Pod
metadata:
name: busybox
namespace: ns01
spec:
containers:
- image: busybox:1.34
imagePullPolicy: IfNotPresent
name: busybox
command:
- sleep
- "3600"
restartPolicy: Always