38 k8s-20.K8s基础篇-配置管理1.3 修改配置单个文件名称
01.[root@k8s-master01 configmap]# kubectl create cm cmspecialname --from-file=game-conf=conf/game.conf configmap/cmspecialname created 02.//[root@k8s-master01 configmap]# kubectl get cm NAME DATA AGE cmfromdir 2 12m cmfromfile 1 3m16s cmspecialname 1 14s kube-root-ca.crt 1 12d 03.[root@k8s-master01 configmap]# kubectl get cm cmspecialname -o yaml apiVersion: v1 data: game-conf: | lives=3 secret.code=true kind: ConfigMap metadata: creationTimestamp: "2022-02-23T07:59:23Z" managedFields: - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:data: .: {} f:game-conf: {} manager: kubectl-create operation: Update time: "2022-02-23T07:59:23Z" name: cmspecialname namespace: default resourceVersion: "692958" uid: 8e619996-59e5-4e40-a642-ce4d74551730