In this project I'm demonstrating you how to use Terraform together to create and manage the Kubernetes cluster on Kind.
- Terraform CLI installed
- Docker
First, clone the repo:
$ git clone https://github.com/mateusclira/challenge-cloud-engineer.git
$ cd challenge-cloud-engineer
Then initialize Terraform config:
terraform init
Review the actions plan:
terraform plan
Run the Terraform actions:
terraform apply
https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.4/deploy/static/provider/cloud/deploy.yaml
https://artifacthub.io/packages/helm/cert-manager/cert-manager
First install the CRDs:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.crds.yaml
Add the helm repo
helm repo add jetstack https://charts.jetstack.io
Then install the cert-manager:
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.13.2 --set prometheus.enabled=false --set webhook.timeoutSeconds=4
You are going to need to indicate that the your cluster's IP is addressed to your Hostname. To do so, you are going to need a DNS Provider service
kubectl apply -f .\kubernetes\issuer.yaml
kubectl apply -f .\kubernetes\deployment.yaml
kubectl apply -f .\kubernetes\service.yaml
kubectl apply -f .\kubernetes\certificate.yaml
Make sure your certificate ran correctly and created the tls. You should be able to see a recently created kubernetes.io/tls's TYPE
kubectl get secrets
kubectl apply -f .\kubernetes\ingress.yaml
- Terraform Kind Cluster Creation
- Deploy of a Web Application
- Ingress to deploy HTTPS on a Kubernetes Cluster
- Kubernetes
- TechWorld with Nana - This one actually teaches everything you need to know on DevOps
- https://piotrminkowski.com/2022/06/28/manage-kubernetes-cluster-with-terraform-and-argo-cd/
- https://www.linkedin.com/pulse/automating-kubernetes-cluster-cicd-setup-terraform-argo-stephen-kuntz/
- Kind
- SSL/TLS
- Network on Cluster
- Configuring Ingress