Install Portworx on EKS by AWS
Introduction
So you want to start using persistent storage for you Elastic Kubernetes Services (EKS) cluster on AWS? Let’s go ahead and deploy Portworx Enterprise! For this installation I’ll be using the Portworx Operator with makes both the installation of Portworx really easy, but also allows you to make changes afterwards, or do upgrades of the cluster easily. To make our live easy we’ll use the Cloud Drives integration for AWS, so that Portworx will automatically create the required EBS volumes in AWS and attach them to the EKS worker nodes automatically.
More of a visual style learning, feel free to check out the recording I did on the installation below.
Prerequisites
In this installation procedure we are going to follow the Portworx documentation for installing Portworx on top of AWS EKS. Before you start, this procedure, I expect you to have your AWS EKS cluster up-and-running and you’ve reviewed the Portworx requirements for the installation.
Also add the following instance privileges to the nodes in the EKS cluster. Either use the AWS guide for this or check out my video above on where to configure.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "<stmt-id>",
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:ModifyVolume",
"ec2:DetachVolume",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:DeleteTags",
"ec2:DeleteVolume",
"ec2:DescribeTags",
"ec2:DescribeVolumeAttribute",
"ec2:DescribeVolumesModifications",
"ec2:DescribeVolumeStatus",
"ec2:DescribeVolumes",
"ec2:DescribeInstances",
"autoscaling:DescribeAutoScalingGroups"
],
"Resource": [
"*"
]
}
]
}
Generate the installation specs
- Under the Basic tab, ensure that the following config parameters are set.
- Select the Use the Portworx operator checkbox.
- Select the 2.8 or higher version of Portworx in Portworx Version drop-down.
- Under ETCD, select Built-in.
- Under the Storage tab, ensure that the following config parameters are set.
- Under Select your environment, choose Cloud.
- Under Select Cloud platform, select AWS.
- Under Configure storage devices, choose Create Using a Spec in Select type of disk.
- Under the Customize tab, ensure that the following config parameters are set.
- In Are you running either of these?, choose Amazon Elastic Container Service for Kubernetes (EKS).
- In Advanced settings, select the following checkboxes.
- Enable Stork
- Enable CSI
- Enable Monitoring
- Enable Telemetry
Save the spec to a local file.
Install the Operator
To install the Portworx Operator, run the following command:
kubectl apply -f 'https://install.portworx.com/2.8?comp=pxoperator'
Install Portworx
Next to install Portworx apply the spec file you saved from Portworx Central before, using kubectl apply -f spec.yaml
You can monitoring the installation process with the following command, which should show you the state of the Portworx pods. They should all go into a ready state:
kubectl get pods -o wide -n kube-system -l name=portworx
To get more details from any of the pods, use the following:
kubectl -n kube-system describe pods <portworx-pod-id>
Check Portworx cluster status
Once the pods have gone into a ready state, you can check the Portworx cluster health with the following command:
PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status
Conclusion
This completes the installation of Portworx on a Kubernetes cluster that runs within a AWS EKS cluster. You can now start deploying StatefulSets, using the example StorageClasses created, of create your own StorageClasses and get creative!