Quick Start
In this walk-through, we create and run a playbook that scales a Kubernetes deployment.
Prerequisites
- Mission Control is installed and configured
- The
mission-control-saservice account has relevant permissions kubectlis installed and connected
-
Create a playbook spec
restart-deployment.yamlapiVersion: mission-control.flanksource.com/v1kind: Playbookmetadata:name: restart-deploymentspec:description: Restart deploymentconfigs:- types:- Kubernetes::Deploymentactions:- name: kubectl rollout restart deploymentexec:script: kubectl rollout restart deployment {{.config.name}} -n {{.config.tags.namespace}}See Playbook for the full specification.
-
Apply the playbook
kubectl apply -f restart-deployment.yamlAdd playbook from UI
warningThis is for development purposes, for production use a GitOps tool like Flux or Argo to apply the spec.
-
Navigate to the Playbooks page
-
Click on the icon to add a new playbook
-
Add the
specfrom the YAML file above
-
-
Run the playbook
-
Navigate to a Deployment in the Catalog
-
Select Restart Deployment from the Playbooks menu
-
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) -
View the playbook progress
