OVH Pro GetInfra Kubernetes Terraform Kit
OVH Pro GetInfra Kubernetes Terraform Kit
OVH Pro GetInfra Kubernetes Terraform Kit
Overview
The OVH Pro GetInfra Kubernetes Terraform Kit is a powerful, modular solution designed to streamline the deployment and management of Kubernetes clusters on OVH Pro infrastructure. Leveraging Terraform, this kit automates resource provisioning, cluster setup, and configuration, enabling DevOps teams to deploy scalable, reliable Kubernetes environments efficiently.
Prerequisites
Before using the GetInfra Kubernetes Terraform Kit, ensure you have the following:
- An OVH Pro account with API access credentials
- Terraform (version 1.0 or later) installed
- An SSH key pair for cluster access
- Basic knowledge of Terraform and Kubernetes
Getting Started
1. Clone the Repository
git clone https://github.com/ovh/getinfra-k8s-terraform.git
cd getinfra-k8s-terraform
2. Configure Variables
Create a terraform.tfvars
file with your OVH API credentials and desired cluster parameters:
ovh_endpoint = "ovh-eu"
application_key = "YOUR_APP_KEY"
application_secret = "YOUR_APP_SECRET"
consumer_key = "YOUR_CONSUMER_KEY"
region = "GRA"
k8s_version = "1.24.0"
node_count = 3
node_size = "vps-ssd-2"
ssh_public_key = "~/.ssh/id_rsa.pub"
3. Initialize Terraform
terraform init
4. Deploy the Kubernetes Cluster
terraform apply
Review the plan and confirm to deploy.
Configuration Details
OVH API Authentication
The kit uses OVH API credentials for resource provisioning. Generate these credentials via the OVH Control Panel and input them in your terraform.tfvars
.
Cluster Parameters
Customize your cluster by modifying variables such as region
, k8s_version
, node_count
, and node_size
.
SSH Access
Ensure your SSH public key is available and specified for secure access to cluster nodes.
Managing the Cluster
Scaling Nodes
Adjust the node_count
variable and run:
terraform apply
to scale your cluster.
Updating Kubernetes Version
Change the k8s_version
variable and reapply to update the cluster:
terraform apply
Upgrading Terraform
Always ensure your Terraform version matches the compatibility requirements specified in the repository.
Monitoring and Maintenance
- Use OVH monitoring tools for infrastructure health.
- Use
kubectl
with the generated kubeconfig for cluster management. - Regularly update your cluster and nodes for security patches.
Troubleshooting
- Check API credentials if resource provisioning fails.
- Verify network configurations if nodes cannot communicate.
- Consult Terraform logs for deployment errors.
Additional Resources
Support
For further assistance, open issues on the GitHub repository or contact OVH support.
This documentation is intended for technical professionals familiar with cloud infrastructure, Terraform, and Kubernetes. Proper security practices should be followed when handling credentials and access keys.