1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 22:22:09 +02:00
tldr/pages/common/kubectl-replace.md
Aditya Shrivastav dbfb06385e
kubectl replace: add page (#11091)
* kubectl replace: add page

* kubectl replace: fix typo

* kubectl replace: fix typo

* kubectl replace: fix typo

* kubectl replace: apply suggestions from code review

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
2023-10-20 13:48:58 +02:00

459 B

kubctl replace

Replace a resource by file or stdin. More information: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#replace.

  • Replace the resource using the resource definition file:

kubectl replace -f {{path/to/file.yml}}

  • Replace the resource using the input passed into stdin:

kubectl replace -f -

  • Force replace, delete and then re-create the resource:

kubectl replace --force -f {{path/to/file.yml}}