- Ensure you have the necessary IAM permissions and the required CLI tools installed (aws, eksctl, kubectl), and configure your AWS credentials and region.
- Create an EKS cluster using eksctl and update the kubeconfig.
- Review the Docker Hub page for HarperDB to understand the container details.
- Create a directory named "harperdb" to store the Kubernetes manifests.
- Start with creating a secret.yaml file to define environment variables.
- Create a pvc.yaml file to configure a persistent volume claim.
- Create a deploy.yaml file to define the deployment, including the container image and volume mounts.
- Create a svc.yaml file to expose the deployment with a LoadBalancer service.
- Create the namespace "harperdb" and apply the manifests using the "kubectl create -f ." command.
- Fix the PVC issue by adding necessary IAM roles and EBS CSI objects to the cluster.
- Verify the PVC and PV status using "kubectl get pvc" and "kubectl get pv" commands.
- Update the deployment.yaml file to include a security context (fsGroup) for correct volume permissions.
- Apply the updated deployment manifest using "kubectl apply -f deploy.yaml".
- Test the application by sending an API call using CURL to the service endpoint.
- Validate the workloads using "kubectl get all -n harperdb".
- Test persistence by deleting the pod and checking if the schema is restored.
- Clean up by deleting the created objects using "kubectl delete" commands and removing the "harperdb" directory.
- Finally, delete the EKS cluster using eksctl.