1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-23 22:24:05 +02:00

kubectl-apply: refresh page (#17652)

This commit is contained in:
Managor 2025-08-16 10:22:41 +03:00 committed by GitHub
parent 5e6e9e5e0d
commit 60ca5e0945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,18 +4,26 @@
> Create and update resources in a cluster.
> More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply>.
- Apply a configuration to a resource by file name or `stdin`:
- Apply a configuration to a resource by file name:
`kubectl apply {{[-f|--filename]}} {{resource_filename}}`
`kubectl apply {{[-f|--filename]}} {{path/to/filename}}`
- Apply a configuration to a resource from `kustomization.yaml` in a directory:
`kubectl apply {{[-k|--kustomize]}} {{path/to/directory}}`
- Apply a configuration to a resource by `stdin`:
`{{cat pod.json}} | kubectl apply {{[-f|--filename]}} -`
- Edit the latest last-applied-configuration annotations of resources from the default editor:
`kubectl apply edit-last-applied {{[-f|--filename]}} {{resource_filename}}`
`kubectl apply edit-last-applied {{[-f|--filename]}} {{path/to/filename}}`
- Set the latest last-applied-configuration annotations by setting it to match the contents of a file:
`kubectl apply set-last-applied {{[-f|--filename]}} {{resource_filename}}`
`kubectl apply set-last-applied {{[-f|--filename]}} {{path/to/filename}}`
- View the latest last-applied-configuration annotations by type/name or file:
`kubectl apply view-last-applied {{[-f|--filename]}} {{resource_filename}}`
`kubectl apply view-last-applied {{[-f|--filename]}} {{path/to/filename}}`