Installing Autopilot for Portworx
Autopilot lets you define monitoring conditions in your cluster and automatically apply changes when those conditions occur. For more information about Autopilot, see the Portworx documentation.
Prerequisites
-
Autopilot requires a running Prometheus instance in your cluster. To set up Prometheus, see Monitor your Portworx cluster.
-
Make sure that Prometheus is enabled. If it is not enabled, edit your
storageClusterresource and setenabled: truein the Prometheus configuration.Verify that the Prometheus service exists:
oc get service -n kube-system prometheusExample Prometheus configuration:
monitoring: prometheus: alertManager: enabled: true enabled: true exportMetrics: true resources: {} telemetry: {} -
Verify that the Prometheus instance has been created.
oc get service -n kube-system prometheusNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE px-prometheus ClusterIP 172.21.157.200 <none> 9090/TCP 19hNote that
http://prometheus:9090is the default Prometheus endpoint when Autopilot is enabled.
Installing Autopilot
-
Download and save the Autopilot resources to a file called
autopilot.yaml. -
Optional: If you are installing Autopilot with
PX-Security, you must modify thestorageClusterto add thePX_SHARED_SECRETenvironment variable to the autopilot section.env: - name: PX_SHARED_SECRET valueFrom: secretKeyRef: key: apps-secret name: px-system-secrets -
Deploy Autopilot to your cluster.
oc apply -f autopilot.yaml
Creating Rules
Now that you have installed Autopilot in your cluster, see the Portworx documentation to create custom rules and actions for your Autopilot configuration.