kubectl-apply
Manage applications through files defining Kubernetes resources. tldr-pages
On several platforms
Several platforms
Manage applications through files defining Kubernetes resources. Create and update resources in a cluster.
Apply a configuration to a resource by file name
kubectl apply --filename path/to/fileIdentify--filenameThe files, directories or URLs that contain the configurations to apply. kubectl referenceApply a configuration to a resource from kustomization.yaml in a directory
kubectl apply --kustomize path/to/directoryIdentify--kustomizeProcess a kustomization directory. kubectl referenceApply a configuration to a resource by stdin
cat pod.json | kubectl apply --filename -IdentifyEdit the latest last-applied-configuration annotations of resources from the default editor
kubectl apply edit-last-applied --filename path/to/fileIdentify--filenameFilename, directory, or URL to files to use to edit the resource kubectl referenceSet the latest last-applied-configuration annotations by setting it to match the contents of a file
kubectl apply set-last-applied --filename path/to/fileIdentify--filenameFilename, directory, or URL to files that contains the last-applied-configuration annotations kubectl referenceView the latest last-applied-configuration annotations by type/name or file
kubectl apply view-last-applied --filename path/to/fileIdentify--filenameFilename, directory, or URL to files that contains the last-applied-configuration annotations kubectl reference