FahamLah

Arahan

kubectl create configmap

kubectl create configmap <name> --from-literal=KEY=value [--from-file=<file>]

Risiko: Selamat

Apa ia buat

Tampal nota tetapan di dinding: satu ConfigMap.

Bila nak guna

Tetapan yang berubah lebih kerap daripada image.

Contoh

$ kubectl create configmap settings --from-literal=GREETING=Hai

Nota yang kata GREETING ialah Hai.

$ kubectl create configmap settings --from-literal=GREETING=Hai --dry-run=client -o yaml

Cetak YAML, tiada yang dicipta.