ื‘ืฉืœื‘ ื”ื–ื” ื ืœืžื“:


ื—ืœืง 1 โ€” ื™ืฆื™ืจืช ConfigMap ื—ื“ืฉ

ื ื™ืฆื•ืจ ืงื•ื‘ืฅ:

vi green-config.yaml

ื ื›ื ื™ืก:

apiVersion: v1
kind: ConfigMap
metadata:
  name: green-config
data:
  color.txt: green

  hello-from-green.js: |
    console.log("Hello from");
    console.log("green ConfigMap");

  color_config_path: /mount/config/color.txt

๐Ÿ”Ž ืžื” ื™ืฉ ืœื ื• ื›ืืŸ?

ื™ืฉ ืœื ื• 3 Keys:

  1. color.txt โ†’ ื™ื•ืคื™ืข ื›ืงื•ื‘ืฅ
  2. hello-from-green.js โ†’ ืงื•ื‘ืฅ JS ืžืจื•ื‘ื” ืฉื•ืจื•ืช
  3. color_config_path โ†’ ืขืจืš ืฉื ืจืฆื” ืœื”ืขื‘ื™ืจ ื›ึพEnvironment Variable

ืžื ืงื•ื“ืช ืžื‘ื˜ ืฉืœ Kubernetes โ€”

ื”ื›ื•ืœ ื–ื” ืคืฉื•ื˜ Key-Value pairs.

ื”ืžืฉืžืขื•ืช ื ืงื‘ืขืช ืขืœ ื™ื“ื™ื ื•.