[!NOTE] A plugin for Kubernetes command-line tool kubectl, which allows you to convert manifests between different API versions. This can be particularly helpful to migrate manifests to a non-deprecated api version with newer Kubernetes release.
# intel$curl-LO"https://dl.k8s.io/release/$(curl-L-shttps://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert"# apple silicon$curl-LO"https://dl.k8s.io/release/$(curl-L-shttps://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert"$chmod+x./kubectl-convert$sudomv./kubectl-convert/usr/local/bin/kubectl-convert$sudochownroot:/usr/local/bin/kubectl-convert
# intel$curl-LO"https://dl.k8s.io/release/$(curl-L-shttps://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"# apple silicon$curl-LO"https://dl.k8s.io/release/$(curl-L-shttps://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"# or via brew$brewinstallkubectl
completion
[!NOTE] The Homebrew installation of bash-completion v2 sources all the files in the BASH_COMPLETION_COMPAT_DIR directory, that's why the latter two methods work
$ kubectl api-resources
error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request
# Edit the last-applied-configuration annotations by type/name in YAMLkubectlapplyedit-last-applieddeployment/nginx# Edit the last-applied-configuration annotations by file in JSONkubectlapplyedit-last-applied-fdeploy.yaml-ojson