{"id":30110555,"url":"https://github.com/techiescamp/terraform-digitalocean","last_synced_at":"2026-02-07T21:31:54.776Z","repository":{"id":303976459,"uuid":"1015806341","full_name":"techiescamp/terraform-digitalocean","owner":"techiescamp","description":"This repository contains Terraform configurations to automate infrastructure provisioning on DigitalOcean.","archived":false,"fork":false,"pushed_at":"2025-07-14T11:29:41.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T04:47:38.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techiescamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T04:25:37.000Z","updated_at":"2025-07-14T11:29:45.000Z","dependencies_parsed_at":"2025-07-10T19:53:53.824Z","dependency_job_id":"8665674b-54b6-4215-b070-40bab5ab1749","html_url":"https://github.com/techiescamp/terraform-digitalocean","commit_stats":null,"previous_names":["techiescamp/terraform-digitalocean"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techiescamp/terraform-digitalocean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-digitalocean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-digitalocean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-digitalocean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-digitalocean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techiescamp","download_url":"https://codeload.github.com/techiescamp/terraform-digitalocean/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techiescamp%2Fterraform-digitalocean/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29208705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T20:33:12.493Z","status":"ssl_error","status_checked_at":"2026-02-07T20:30:47.381Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T04:47:34.763Z","updated_at":"2026-02-07T21:31:54.755Z","avatar_url":"https://github.com/techiescamp.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Lab Setup on DigitalOcean with Terraform\n\nThis repository contains Terraform infrastructure as code (IaC) to deploy a Kubernetes learning lab on DigitalOcean using kubeadm, with CRI-O as the container runtime and Calico for networking. Perfect for hands-on learning, experimentation, and practicing Kubernetes concepts.\n\n---\n\n## Architecture\n\nThe lab setup provisions:\n\n- **Control Plane**: Single control plane node with reserved IP (2 vCPU, 4GB RAM)\n- **Worker Nodes**: 2 worker nodes by default (2 vCPU, 2GB RAM each)\n- **Container Runtime**: CRI-O v1.33\n- **Kubernetes Version**: v1.33.0\n- **Network Plugin**: Calico v3.29.1\n- **VPC**: Private networking with custom CIDR\n- **Firewall**: Open firewall rules for lab experimentation (NOT for production) \n- **Spaces Object Storage** This for Terraform state file storage\n\n## Prerequisites \n\n- Terraform\n- DigitalOcean CLI (doctl)\n- SSH Key For accessing lab node\n- PAT(Personal access tokens) \u0026  Access Keys\n- Basic understanding of Kubernetes concepts and DigitalOcean\n\n### **DigitalOcean Setup**\n\n- Create a DigitalOcean account (if you don’t already have one)\n- Open the DigitalOcean Console → Navigate API → Personal Access Tokens → Generate a new token with all permission\n- copy the token \n### configuration doctl (DigitalOcean CLI)\n```bash\ndoctl auth init\n\nPlease enter your access token: \u003cPaste your token here\u003e\n\n# Verify Authentication\ndoctl account get\n\n```\n  \n### Add your SSH key to DigitalOcean:\n```bash\ndoctl compute ssh-key create \"\u003ckey_name\u003e\" --public-key \"$(cat ~/.ssh/id_rsa.pub)\"\n# verify the ssh key\ndoctl compute ssh-key list\n```\n**SSH Key Setup**\n(If you don’t already have an SSH key):\n```bash\nssh-keygen -t rsa -b 4096 \n```\n### Setup Environment Variables\nOpen the DigitalOcean Console → Navigate to Spaces (Object Storage) → Create an Access Key with Full Access → Click 'Create'.\ncopy access key  and secret key \n```bash\nexport AWS_ACCESS_KEY_ID=\"\u003cyour-access-key\u003e\"\nexport AWS_SECRET_ACCESS_KEY=\"\u003cyour-secret-access-ket\u003e\"\n```\n\n## Start with Lab Setup\n**1. Clone and Configure**\n```bash\ngit clone https://github.com/techiescamp/terraform-digitalocean.git\ncd terraform-digitalocean\n```\n**2. Update `vars/dev/backend.tfvars` `vars/dev/k8s-cluster.tfvars` `infra/k8s-cluster/backend.tf` with your values**\n```bash\n# vars/dev/k8s-cluster.tfvars\n\ndo_token             = \"\u003cyour-token\u003e\" \nssh_key_name         = \"\u003cyour-ssh-key-name\u003e\"\nssh_private_key_path = \"\u003cyour-SSH-private-key-local-path\u003e\"\nregion               = \"blr1\"              # Bangalore region\nworker_count         = 2                   # Number of worker nodes\n\n\n# vars/dev/backend.tfvars\n\nspaces_access_key_id       = \"\u003cyour-access-key-id\u003e\"\nspaces_secret_access_key   = \"\u003cyour-secret-access-key\u003e\"\nspace_name                 = \"\u003cfile name of terraform-state\u003e\"\ndo_token                   = \"\u003cyour-token\u003e\"\nspace_region                = \"blr1\" # Bangalore region\nregion                      = \"blr1\" # Bangalore region\n\n# infra/k8s-cluster/backend.tf\n\nbucket                      = \"\u003cyour space_name\u003e\"\nendpoints = {\n      s3 = \"https://\u003cyour_bucket_region\u003e.digitaloceanspaces.com\"\n\n\n```\n**3. Initialize and Deploy backend(Spaces Object Storage)**\n```bash\ncd  infra/backend/\n\n# Initialize Terraform\nterraform init\n\n# Preview the infrastructure plan\nterraform plan -var-file=\"../../vars/dev/backend.tfvars\"\n\n# Deploy the Spaces Object Storage \nterraform apply --auto-approve -var-file=\"../../vars/dev/backend.tfvars\"\n```\n\n**4. Initialize and Deploy k8s cluster lab setup**\n```bash\ncd  ../k8s-cluster/  #OR  cd infra/k8s-cluster/\n\n# Initialize Terraform\nterraform init\n\n# Preview the infrastructure plan\nterraform plan -var-file=\"../../vars/dev/k8s-cluster.tfvars\"\n\n# Deploy the k8s cluster\nterraform apply --auto-approve -var-file=\"../../vars/dev/k8s-cluster.tfvars\"\n```\n\n\n## Security Notice (Lab Configuration)\n**⚠️ Lab Security Warning**: This configuration uses permissive security settings for ease of learning. Do not use these settings in production!\n\n## Cleanup\nTo destroy the lab setup and avoid ongoing costs:\n```bash\n\nterraform destroy --auto-approve -var-file=\"../../vars/dev/k8s-cluster.tfvars\"\n\ncd ../backend\nterraform destroy --auto-approve -var-file=\"../../vars/dev/backend.tfvars\"\n\n# Delete SSH key \ndoctl compute ssh-key delete \u003cid\u003e\n\n```\n## Cost Management\n- Destroy the lab after each session\n- Use smaller droplet sizes for learning\n- Monitor your DigitalOcean billing dashboard\n- Set up billing alerts in DigitalOcean\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiescamp%2Fterraform-digitalocean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechiescamp%2Fterraform-digitalocean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechiescamp%2Fterraform-digitalocean/lists"}