IBM Cloud Docs
Installing Autopilot for Portworx

Installing Autopilot for Portworx

Autopilot allows you to specify monitoring conditions in your cluster to react and apply changes when certain conditions occur without direct intervention. For more information about Autopilot, see the Portworx documentation

Prerequisites

  1. Install Portworx.

  2. Access your Red Hat OpenShift cluster.

  3. Autopilot requires a running Prometheus instance in your cluster. To set up Prometheus, see Monitor your Portworx cluster.

  4. Make sure Prometheus is enabled, or edit your storageCluster resource and enable it by setting enabled: true.

    kubectl get service -n kube-system prometheus
    
    monitoring:
    prometheus:
        alertManager:
        enabled: true
        enabled: true
        exportMetrics: true
        resources: {}
    telemetry: {}
    
  5. Verify that the Prometheus instance has been created.

    kubectl get service -n kube-system prometheus
    
    NAME            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
    px-prometheus   ClusterIP   172.21.157.200   <none>        9090/TCP   19h
    

    Note that http://prometheus:9090 is the default Prometheus endpoint when Autopilot is enabled.

Installing Autopilot

  1. Download and save the Autopilot resources to a file called autopilot.yaml.

  2. Optional: If you are installing Autopilot with PX-Security, you must modify the storageCluster to add the PX_SHARED_SECRET environment variable to the autopilot section.

    env:
    - name: PX_SHARED_SECRET
    valueFrom:
    secretKeyRef:
    key: apps-secret
    name: px-system-secrets
    
  3. Deploy Autopilot to your cluster.

    kubectl apply -f autopilot.yaml
    

Creating Rules

Now that you have installed autopilot in your cluster, refer to the Portworx documentation on how to create custom rules and actions for your autopilot configuration.