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
-
Create a playbook spec
restart-deployment.yamlapiVersion: 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.
-
Apply the playbook
kubectl apply -f restart-deployment.yaml
Add 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
spec
from 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