Cov txheej txheem:

Kuv yuav kho cov ntaub ntawv ConfigMap li cas?
Kuv yuav kho cov ntaub ntawv ConfigMap li cas?

Video: Kuv yuav kho cov ntaub ntawv ConfigMap li cas?

Video: Kuv yuav kho cov ntaub ntawv ConfigMap li cas?
Video: FBI / KUB - Ntawv Caw (Official Full Song + Lyrics) 2024, Kaum ib hlis
Anonim

Cia li pov: kubectl kho configmap < npe configmap > ntawm koj kab lus. Ces koj ua tau kho koj configuration. Qhov no opens vim tus kws kho mob nrog lub configmap hauv yaml format. Tam sim no yooj yim kho nws thiab txuag nws.

Tsis tas li ntawd, kuv yuav siv ConfigMap li cas?

  1. Tsim ConfigMap. Tsim ConfigMap siv qhov piv txwv los ntawm ntu dhau los.
  2. Ntxiv cov khoom 'envFrom' rau koj Pod's YAML. Teem tus yuam sij 'envFrom' hauv txhua lub thawv rau ib qho khoom uas muaj cov npe ntawm ConfigMaps koj xav kom suav nrog. zoo: Pod.

Kuj Paub, Kubectl config file nyob qhov twg? Los ntawm lub neej ntawd, kubtl ua nrhiav ib ntaub ntawv npe config hauv $HOME/. kub directory. Koj tuaj yeem qhia lwm yam kubeconfig cov ntaub ntawv los ntawm kev teeb tsa KUBECONFIG ib puag ncig hloov pauv lossis los ntawm kev teeb tsa tus chij --kubeconfig.

Tsis tas li ntawd, ConfigMap yog dab tsi?

Cov ConfigMap API cov peev txheej muab cov txheej txheem los txhaj cov ntim nrog cov ntaub ntawv teeb tsa thaum khaws cov ntim tsis raug cai ntawm Kubernetes. ConfigMap tuaj yeem siv los khaws cov ntaub ntawv zoo xws li cov khoom ntiag tug lossis cov ntaub ntawv ntxhib xws li tag nrho cov ntaub ntawv teeb tsa lossis JSON blobs.

Koj ua qhov zais cia hauv Kubernetes li cas?

Siv Secrets li ntaub ntawv los ntawm Pod

  1. Tsim ib qho zais cia lossis siv ib qho uas twb muaj lawm. Ntau Pods tuaj yeem siv tib yam zais cia.
  2. Hloov kho koj lub Pod txhais kom ntxiv ntim hauv qab. spec.
  3. Ntxiv ib. spec.
  4. Hloov kho koj cov duab lossis kab hais kom ua kom qhov kev zov me nyuam saib cov ntaub ntawv hauv cov npe ntawd.

Pom zoo: