【发布时间】:2020-08-25 01:27:10
【问题描述】:
我正在使用busybox 容器来理解kubernetes 的概念。
但是如果运行一个简单的test-pod.yaml 带有繁忙的框图像,它处于完成状态而不是运行状态
谁能解释一下原因
apiVersion: v1
kind: Pod
metadata:
name: dapi-test-pod
spec:
containers:
- name: test-container
image: k8s.gcr.io/busybox
command: [ "/bin/sh", "-c", "ls /etc/config/" ]
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
name: special-config
restartPolicy: Never
【问题讨论】:
-
容器执行了给终止的命令,因此它终止了。
标签: kubernetes