rollout

Check the rollout status of a daemonset

    Manage the rollout of a resource.

    Valid resource types include:

    • deployments
    • daemonsets
    • statefulsets

    $ kubectl rollout SUBCOMMAND


    View the rollout history of a deployment

    1. kubectl rollout history deployment/abc

    View the details of daemonset revision 3

    1. kubectl rollout history daemonset/abc --revision=3

    View previous rollout revisions and configurations.

    Usage

    $ kubectl rollout history (TYPE NAME | TYPE/NAME) [flags]

    Flags


    pause

    Paused resources will not be reconciled by a controller. Use “kubectl rollout resume” to resume a paused resource. Currently only deployments support being paused.

    Usage

    NameShorthandDefaultUsage
    allow-missing-template-keystrueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
    field-managerkubectl-rolloutName of the manager used to track field ownership.
    filenamef[]Filename, directory, or URL to files identifying the resource to get from a server.
    kustomizekProcess the kustomization directory. This flag can’t be used together with -f or -R.
    outputoOutput format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
    recursiveRfalseProcess the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory.
    show-managed-fieldsfalseIf true, keep the managedFields when printing objects in JSON or YAML format.
    templateTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [].

    Restart a deployment

    1. kubectl rollout restart deployment/nginx

    Restart a daemon set

    1. kubectl rollout restart daemonset/abc

    Restart a resource.

    Resource rollout will be restarted.

    Usage

    $ kubectl rollout restart RESOURCE

    Flags


    resume

    Resume an already paused deployment

    1. kubectl rollout resume deployment/nginx

    Resume a paused resource.

    Usage

    NameShorthandDefaultUsage
    allow-missing-template-keystrueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
    field-managerkubectl-rolloutName of the manager used to track field ownership.
    filenamef[]Filename, directory, or URL to files identifying the resource to get from a server.
    kustomizekProcess the kustomization directory. This flag can’t be used together with -f or -R.
    outputoOutput format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
    recursiveRfalseProcess the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory.
    show-managed-fieldsfalseIf true, keep the managedFields when printing objects in JSON or YAML format.
    templateTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

    Show the status of the rollout.

    By default ‘rollout status’ will watch the status of the latest rollout until it’s done. If you don’t want to wait for the rollout to finish then you can use —watch=false. Note that if a new rollout starts in-between, then ‘rollout status’ will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use —revision=N where N is the revision you need to watch for.

    Usage

    $ kubectl rollout status (TYPE NAME | TYPE/NAME) [flags]

    Flags


    undo

    Roll back to the previous deployment

    1. kubectl rollout undo deployment/abc

    Roll back to daemonset revision 3

      Roll back to the previous deployment with dry-run

      1. kubectl rollout undo --dry-run=server deployment/abc

      Roll back to a previous rollout.

      Usage

      NameShorthandDefaultUsage
      allow-missing-template-keystrueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
      dry-runnoneMust be “none”, “server”, or “client”. If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.
      filenamef[]Filename, directory, or URL to files identifying the resource to get from a server.
      kustomizekProcess the kustomization directory. This flag can’t be used together with -f or -R.
      outputoOutput format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
      recursiveRfalseProcess the directory used in -f, —filename recursively. Useful when you want to manage related manifests organized within the same directory.
      show-managed-fieldsfalseIf true, keep the managedFields when printing objects in JSON or YAML format.
      templateTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [].
      to-revision0The revision to rollback to. Default to 0 (last revision).