Skip to main content

Quick Start

In this walkthrough, we'll create and run a playbook that scales a Kubernetes deployment.

Prerequisites
  • Mission Control is installed and configured
  • The mission-control-sa service account has relevant permissions
  • kubectl is installed and connected
  1. Create a playbook spec

    restart-deployment.yaml
    apiVersion: mission-control.flanksource.com/v1
    kind: Playbook
    metadata:
    name: restart-deployment
    spec:
    description: Restart deployment
    configs:
    - types:
    - Kubernetes::Deployment
    actions:
    - name: kubectl rollout restart deployment
    exec:
    script: kubectl rollout restart deployment {{.config.name}} -n {{.config.tags.namespace}}

    See Playbook for the full specification.

  2. Apply the playbook

    kubectl apply -f restart-deployment.yaml

    Add playbook from UI
    warning

    This is for development purposes, for production use a GitOps tool like Flux or Argo to apply the spec.

    1. Navigate to the Playbooks page

    2. Click on the icon to add a new playbook

    3. Add the spec from the YAML file above

  3. Run the playbook

  4. Navigate to a Deployment in the Catalog

  5. Select Restart Deployment from the Playbooks menu

  6. Click Run

    See Event Triggers to run the playbook on event (e.g. pod crashlooping)
    See Webhooks to run the playbook from a webhook (e.g. on Git push)

  7. View the playbook progress