mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-13 23:48:21 +00:00
Update cheatsheets
This commit is contained in:
21
kubectl-replace
Normal file
21
kubectl-replace
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl 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}}`
|
||||
Reference in New Issue
Block a user