As part of the Cloud Infrastructure course at IMT Atlantique Engineering School, this lab is about deploying a distributed voting application on Docker, Kubernetes, and Proxmox using Terraform.
- Prerequisites
- Deploying the system with Terraform on your local Docker
- Deploying the system with Terraform on Kubernetes cluster
- Deploying Redis on Proxmox VM and connecting it to Kubernetes cluster
Make sure you have Terraform and Docker installed on your machine. You also need to have access to a Kubernetes cluster.
To deploy the system using Terraform on Docker, navigate to the terraform/docker directory and run:
terraform init
terraform applyThe application will be deployed on your local Docker environment. You should see an output similar to the following after completion:

To deploy the system using Terraform on Kubernetes, navigate to the terraform/k8s directory and run:
export KUBECONFIG=kubeconfig
terraform apply -var="kubeconfig_path=$KUBECONFIG"
terraform applyMake sure to replace kubeconfig with the path to your actual kubeconfig file if it's located elsewhere. You should see an output similar to the following after completion:
To deploy Redis on a Proxmox VM and connect it to the Kubernetes cluster, first navigate to the terraform/proxmox directory and run:
export PM_API_TOKEN_ID='your_token_id'
export PM_API_TOKEN_SECRET='your_token_secret'Make sure to replace your_token_id and your_token_secret with your actual Proxmox API token credentials. Also, before going further, check that the Proxmox configuration in terraform/proxmox/pve_vm.tf match your environment (pm_api_url, ssh_key_path, and network_config).
If you change the vm_ip, update redis-endpoints.yaml in k8s-proxmox-manifests folder accordingly. Finally run:
terraform init
terraform applyThis will create a VM on Proxmox. You then need to ssh into the VM and install Redis. You can use the provided install-redis.sh script in the templates folder. Finally, navigate to the terraform/k8s-proxmox directory and run:
export KUBECONFIG=kubeconfig
terraform apply -var="kubeconfig_path=$KUBECONFIG"
terraform applyMake sure to replace kubeconfig with the path to your actual kubeconfig file if it's located elsewhere. This will deploy the application on the Kubernetes cluster, connecting it to the Redis instance running on the Proxmox VM. You should see an output similar to the following after completion:
