kubectl-replace
Replace a resource by file or stdin. tldr-pages
On several platforms
Several platforms
Replace the resource using the resource definition file
kubectl replace --filename path/to/file.ymlIdentify--filenameThe files, directories or URLs that contain the configurations to replace. kubectl referenceReplace the resource using the input passed into stdin
kubectl replace --filename -Identify--filenameThe files, directories or URLs that contain the configurations to replace. kubectl referenceForce replace, delete, and then re-create the resource
kubectl replace --filename path/to/file.yml --forceIdentify--filenameThe files, directories or URLs that contain the configurations to replace. kubectl reference--forceIf true, immediately remove resources from API and bypass graceful deletion. kubectl reference