Autopilot Install and Setup
Follow the steps in the following sections to install and configure Autopilots.
Prerequisites
Autopilot requires a running Prometheus instance in your cluster. If you don't have Prometheus configured in your cluster, refer to the Monitoring section to set it up.
Once you have it installed, find the Prometheus service endpoint in your cluster. Depending on how you installed Prometheus, the precise steps to find this may vary. In most clusters, you can find a service named Prometheus:
kubectl get service -n portworx prometheus
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
prometheus LoadBalancer 10.0.201.44 X.X.X.0 9090:30613/TCP 11d
In the example above, http://prometheus:9090
becomes the Prometheus endpoint. Portworx uses this endpoint in the Autopilot Configuration section.
Why http://prometheus:9090
?
prometheus
is the name of the Kubernetes service for Prometheus in the portworx namespace. Since Autopilot also runs as a pod in the portworx namespace, it can access Prometheus using its Kubernetes service name and port.
Configuring the ConfigMap
Replace http://prometheus:9090
in the following ConfigMap with your Prometheus service endpoint, if it is different. Once replaced, apply this ConfigMap in your cluster:
apiVersion: v1
kind: ConfigMap
metadata:
name: autopilot-config
namespace: portworx
data:
config.yaml: |-
providers:
- name: default
type: prometheus
params: url=http://prometheus:9090
min_poll_interval: 2
Install Autopilot
To install Autopilot, fetch the Autopilot manifest from the Portworx spec generator by clicking here and apply it in your cluster.
Autopilot with PX-Security
If you're installing Autopilot with PX-Security using the Operator, you must modify the StorageCluster yaml. Add the following PX_SHARED_SECRET env var to the autopilot
section:
autopilot:
...
env:
- name: PX_SHARED_SECRET
valueFrom:
secretKeyRef:
key: apps-secret
name: px-system-secrets
Customize Autopilot install
You can customize the Autopilot installation by adding configuration parameters to the Autopilot spec within your Portworx StorageCluster manifest. Here is an example on how to modify your Portworx StorageCluster spec to add these configurations for customizing your Autopilot install:
...
spec:
autopilot:
enabled: true
image: portworx/autopilot:1.3.14
providers:
- name: default
params:
url: http://px-prometheus:9090
type: prometheus
args:
log-level: debug
...
Upgrade Autopilot
To upgrade Autopilot, change the image tag in the deployment with the kubectl set image
command. The following example upgrades Autopilot to the 1.3.0 version:
kubectl set image deployment.v1.apps/autopilot -n portworx autopilot=portworx/autopilot:1.3.0
deployment.apps/autopilot image updated
The command above assumes Autopilot is installed in the portworx
namespace. Change the namespace according to where it's installed in your cluster.