Under the hood
Using EFS, our Wordpress Pods can now be launched into any AZ, and therefore on any K8s worker nodes.
They will all access the same underlying HTML folder (therefore sharing state).
Heading to the AWS console. Head to the EFS page and create EFS. By default, it will try attach it to whateever VPC is available.
Ensure that you attach the correct node worker security groups that we are using for Kubernetes and not the default.
After adding, feel free to add a name tag but then accept the other defaults.
Ensure you take note of the
DNS name and
File System ID.
To be able to enable the EFS, we need to install
amazon-efs-utils onto each of the worker nodes.
ssh -i .ssh/path/to/key.pem ec2-user@REDACTED "sudo yum install -y amazon-efs-utils.