Kubernetes toolbox

CustomResource - unable to delete

kubectl patch app APP_NAME -p '{"metadata": {"finalizers": null}}' --type merge
kubectl patch crd CRD_NAME -p '{"metadata": {"finalizers": null}}' --type merge

Rolout update

kubectl rollout restart deployment/nginx-deployment

spec:
  replicas: 4
  strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 3
    maxUnavailable: 1

Get kubectl and add completion

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"

echo 'source <(kubectl completion bash)' >>~/.bashrc
kubectl completion bash >/etc/bash_completion.d/kubectl
echo "alias k=\'kubectl\'" >> ~/.bashrc
echo 'complete -F __start_kubectl k' >>~/.bashrc
source ~/.bashrc