Pause and resume a rollout

Batch multiple edits without triggering rollouts, then resume to apply once

kubectl rollout pause deploy/<name> -n <ns>; kubectl rollout resume deploy/<name> -n <ns>

tool
kubectl73 commands
tags
kubectlgitopsk8s

More kubectl commands

  • kubectl apply view-last-applied deploy/<name> -n <ns> -o yaml

    Show the last-applied-configuration annotation; diff intent vs live state

  • kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp

    Cluster-wide Warning events newest last; fast triage of failing workloads

  • kubectl get pods -A --field-selector status.phase=Failed

    List pods in Failed phase across namespaces for cleanup or investigation

  • kubectl wait --for=jsonpath='{.status.loadBalancer.ingress[0].ip}' svc/<name> -n <ns> --timeout=120s

    Block in CI until a Service gets its external IP; works on any jsonpath field

  • kubectl auth can-i list secrets -n <ns> --as=<name> --as-group=system:serviceaccounts

    Test RBAC as another identity without their kubeconfig; needs impersonate verb

all 73 kubectl commands