commands.sh

kubectl replace

all

Replace a resource by file or `stdin`.

More info →

Options (1)

-f, --filenameboolean

Replace the resource using the resource definition file

Example: kubectl replace {{[-f|--filename]}} {{path/to/file.yml}}

Examples (3)

Replace the resource using the resource definition file

kubectl replace [-f|--filename] path/to/file.yml

Replace the resource using the input passed into `stdin`

kubectl replace [-f|--filename] -

Force replace, delete and then re-create the resource

kubectl replace [-f|--filename] path/to/file.yml --force
made by @shridhargupta | data from tldr-pages