Skip to content

project-garden/project-garden-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🏗 Project Garden Infrastructure Resources

Infrastructure repository for Project Garden

✅ Pre-requisites

🆃 Terraform

🤔 How To Use?

  • Get AWS Access Key and Secret Key from Google Secret Manager
export AWS_ACCESS_KEY_ID=$(gcloud secrets versions access 2 --secret=project-garden-terraform-secret-key | jq -r '.[0].ACCESS_ID')

export AWS_SECRET_ACCESS_KEY=$(gcloud secrets versions access 2 --secret=project-garden-terraform-secret-key | jq -r '.[0].SECRET_KEY')
  • Start Terraform
terraform init

terraform apply
  • Cleanup
# 🚨 Make sure to delete all k8s ervices
# 🚨 and deployments before proceed to Clean Up.
# 🚨 Otherwise, terraform cannot complete de destroying process

terraform destroy

⛴ Kubernetes (kubectl)

  • Configure kubectl
# Define your AWS CLI Profile
PROFILE=your_aws_cli_profile

# Accessing Cluster Credential
aws eks update-kubeconfig \
    --region $(terraform output -raw region) \
    --name $(terraform output -raw cluster_name) \
    --profile $PROFILE

# Verify
kubectl cluster-info

🛟 Minikube for Development Environment infra

Other way to create learning cluster is using minikube.

# Start a cluster with version 1.24.9
# (Required for current istio version)
minikube start --kubernetes-version=v1.24.9

# Create a tunnel to bridge beetwen local <-> minikube cluster
# DON'T CLOSE THE TERMINAL!
minikube tunnel

🖥 SSH to VM

# All private key is located in .private folder (learning-cluster/infrastructure/.private)
chmod 400 .private/hello_world_vm.pem

ssh -i .private/hello_world_vm.pem ubuntu@$(terraform output -raw ec2_instance_public_ip)

💥 Troubleshoot Results

📚 References

About

Infrastructure Repository for Project Garden

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages