Skip to content

Files

Latest commit

 

History

History
77 lines (53 loc) · 2.88 KB

SETUP.md

File metadata and controls

77 lines (53 loc) · 2.88 KB

Install Autopilot

Autopilot can be installed through Helm and need enough privileges to create objects like services, serviceaccounts, namespaces and relevant RBAC.

Helm Chart customization

Helm charts values and how-to for customization can be found here.

Install

  1. Add autopilot repo
helm repo add autopilot https://ibm.github.io/autopilot/
  1. Install autopilot (idempotent command). The config file is for customizing the helm values. It is not mandatory. If the default values work for you, omit the -f. The --namespace parameter says where the helm chart will be deployed
helm upgrade autopilot autopilot/autopilot --install --namespace=autopilot --create-namespace -f your-config.yml

The controllers should show up in the selected namespace

kubectl get po -n autopilot
NAME                               READY   STATUS    RESTARTS   AGE
autopilot-daemon-autopilot-g7j6h   1/1     Running   0          70m
autopilot-daemon-autopilot-g822n   1/1     Running   0          70m
autopilot-daemon-autopilot-x6h8d   1/1     Running   0          70m
autopilot-daemon-autopilot-xhntv   1/1     Running   0          70m

Uninstall

 helm uninstall autopilot -n autopilot
 kubectl delete namespace autopilot

Enabling Prometheus

Kubernetes Users

The ServiceMonitor object is the one that enables Prometheus to scrape the metrics produced by Autopilot. In order for Prometheus to find the right objects, the ServiceMonitor needs to be annotated with the Prometheus' release name. It is usually prometheus, and that's the default added in the Autopilot release. If that is not the case in your cluster, the correct release label can be found by checking in the ServiceMonitor of Prometheus itself, or the name of Prometheus helm chart. Then, Autopilot's ServiceMonitor can be labeled with the following command

kubectl label servicemonitors.monitoring.coreos.com -n autopilot autopilot-metrics-monitor release=<prometheus-release-name>

OpenShift Users

If on OpenShift, after completing the installation, manually label the namespace to enable metrics to be scraped by Prometheus with the following command: The ServiceMonitor labeling is not required.

kubectl label ns autopilot openshift.io/cluster-monitoring=true

Enabling Grafana

To deploy the autopilot Grafana dashboard, you must install the grafana-operator v5 in the grafana-operator namespace and create a Grafana instance on your cluster in the same namespace.

Then, run the following commands:

kubectl namespace grafana-operator
kubectl create -f grafana/autopilot-dashboard.yaml
kubectl get grafanadashboards

You should see the newly created Grafana dashboard and access it with the Grafana route shown in kubectl get routes -n grafana-operator