By: Delroy Hall – Devops Engineer
In this blog we will cover how to install Portworx to be used as a highly available storage solution on Amazon EKS.
What is Portworx:
Portworx is a software defined storage solution designed for container environments. Portworx provides a wide range use case with various application with data protection, data security, data migration and more in mind.
Pre-requisites:
- AWS EKS cluster v1.21+ (To quickly spin up an EKS cluster feel free to follow this guide)
Installing Portworx via Operator:
1. Create an IAM policy using the following permissions and add the policy to your EKS nodegroup(s) role. These are the permissions needed for storage operations.
1. {
2. "Version": "2012-10-17",
3. "Statement": [
4. {
5. "Sid": "",
6. "Effect": "Allow",
7. "Action": [
8. "ec2:AttachVolume",
9. "ec2:ModifyVolume",
10. "ec2:DetachVolume",
11. "ec2:CreateTags",
12. "ec2:CreateVolume",
13. "ec2:DeleteTags",
14. "ec2:DeleteVolume",
15. "ec2:DescribeTags",
16. "ec2:DescribeVolumeAttribute",
17. "ec2:DescribeVolumesModifications",
18. "ec2:DescribeVolumeStatus",
19. "ec2:DescribeVolumes",
20. "ec2:DescribeInstances",
21. "autoscaling:DescribeAutoScalingGroups"
22. ],
23. "Resource": [
24. "*"
25. ]
26. }
27. ]
28. }
29.
2. To install Portworx on a Kubernetes cluster, you will need to generate a Kubernetes manifest file. Navigate to https://central.portworx.com
- You must log in or create a free account for access
3. To generate the manifest file, select Portworx Enterprise from product catalog
4. Under Product Line, select the option depending on your license/use case. For this guide select Portworx Enterprise, then click Continue.
- Portworx Enterprise comes with a 30-day trial
5. Check the box Use the Portworx Operator, select the latest version of Portworx available, and select the Built-in option for ETCD, the click Next.
- When using the Built-in option Portworx will create and manage an internal key-value store cluster.
6. For your environment select Cloud, and AWS Cloud Platform
7. For Configuring storage devices select Create Using a Spec and the following for storage
- EBS Volume Type: GP2
- Size: 150GB (Minimum required)
- Set Max storage nodes per availability zone: 1, then click Next.
8. Under Network keep the default options, then select Next.
9. Under Customize select Amazon Elastic Container Service for Kubernetes (EKS) and click Finish
- You can set your Cluster Name Prefix under Advanced Settings
10. After generating the spec file Portworx will provide you with the following commands to run against your AWS EKS cluster:
- Deploying the Operator
kubectl apply -f 'https://install.portworx.com/2.11?comp=pxoperator’
- Deploying Portworx
kubectl apply -f 'https://install.portworx.com/2.11?operator=true&mc=false&b=true&kd=type%3Dgp2%2Csize%3D150&mz=1&s=%22type%3Dgp2%2Csize%3D150%22&c=px-cluster&stork=true&csi=true&mon=true&tel=false&st=k8s&promop=true'
The cluster will provision EBS volumes based on our settings and attach them to the nodes.
To verify your install, you can run the following to get Portworx Cluster status:
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
About the Author
Delroy Hall, DevOps Engineer Delroy is an IT professional and tech enthusiast with a passion for providing IT Solutions. He draws inspiration from challenges, believing there is always room for optimization. He is experienced in Cloud Computing, DevOps Automation and holds certifications for AWS and Terraform. |