难道我做错了什么?这是否适用于其他所有人或在我的k8s部署中出现问题?
按照ConfigMaps指南中的示例,应该在下面创建/etc/config/special.how,但不是:
[root@totoro brs-kubernetes]# kubectl create -f example.yaml
configmap "special-config" created
pod "dapi-test-pod" created
[root@totoro brs-kubernetes]# kubectl exec -it dapi-test-pod -- sh
/ # cd /etc/config/
/etc/config # ls
/etc/config # ls -alh
total 4
drwxrwxrwt 2 root root 40 Mar 23 18:47 .
drwxr-xr-x 7 root root 4.0K Mar 23 18:47 ..
/etc/config #
Run Code Online (Sandbox Code Playgroud)
example.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: special-config
namespace: default
data:
special.how: very
special.type: charm
---
apiVersion: v1
kind: …Run Code Online (Sandbox Code Playgroud) kubernetes ×1