How do I update kubernetes deployment image and command?

后端 未结 1 1871

I see that I can use the \"kubectl set image\" command to update a container used in a deployment, like this:

kubectl set image deployment/myapp myapp=repo.mycom         


        
1条回答
  •  暖寄归人
    2021-01-24 12:42

    You could use kubectl patch for that. Run kubectl patch --help to get the docs, but as far as I can tell something like this should do it:

    $ kubectl patch deployment  -p '
    spec:
      template:
        spec:
          containers:
            - name: 
              command: ["new", "command"]
    ' 
    

    0 讨论(0)
提交回复
热议问题