How to patch a ConfigMap in Kubernetes

后端 未结 4 1080
北海茫月
北海茫月 2021-01-01 23:34

Kubernetes ships with a ConfigMap called coredns that lets you specify DNS settings. I want to modify or patch a small piece of this configuration

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-02 00:11

    you should try something like this:

    kubectl get cm some-config -o yaml | run 'sed' commands to make updates | kubectl create cm some-config -o yaml --dry-run | kubectl apply -f - 
    

提交回复
热议问题