This repo is a companion repo to the Provision an EKS Cluster learn guide, containing Terraform configuration files to provision an EKS cluster on AWS.# Terraform-And-Kubernetes
-
Install terrafrom CLI
-
Download demo-terraform-eks-cluster.zip file (files already on my repo) cd to the directory
-
Run Terrafrom init
-
Run Terraform apply
-
Configure kubectl
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
- Download the kubernetes metric server tar file
wget -O v0.3.6.tar.gz https://codeload.github.com/kubernetes-sigs/metrics-server/tar.gz/v0.3.6 && tar -xzf v0.3.6.tar.gz
- Unzip the file and apply using kubectl
unzip metric-server 0.3.6
kubectl apply -f metrics-server-0.3.6/deploy/1.8+
==> verify metric server has been deployed
kubectl get deployment metrics-server -n kube-system
- Deploy the kubernetes Dashboard ==> Apply the rbac roles necessary for the dashboard
kubectl apply -f kubernetes-dashboard-admin.rbac.yaml
==> Schedule the resources necessary for the dashboard
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
==> Verifying the Dashboard resources
kubectl get pods -n kubernetes-dashboard -o wide
kubectl get deployment -n kubernetes-dashboard -o wide
kubectl get svc -n kubernetes-dashboard -o wide
==> Get the url
kubectl proxy
- Authenticate the dashbord
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep service-controller-token | awk '{print $1}')