AWS EKS, with eksctl
Second try with AWS EKS on Fargate. This time with eksctl
.
Create EKS cluster:
1 | 𝜆 eksctl create cluster --name sandpit --version 1.14 --region us-east-2 --fargate |
Create and add EKS mansged node group:
1 | 𝜆 eksctl create nodegroup --cluster sandpit --name workers --node-type t3a.medium --ssh-access --ssh-public-key aws-us-key --managed |
Kubernetes Dashboard
Install Kubernetes Dashboard in Kubernetes cluster:
1 | 𝜆 kubectl get services --all-namespaces |
Connect Kubernetes Dashboard via proxy:
1 | 𝜆 cat .kube/config |
Choose Token, paste the token output from the previous command into the Token field, and choose SIGN IN.
With AWS managed nodes, on Node EC2 Instance:
First Docker application
Deploy first Docker application react-typescript
, from Docker Hub https://hub.docker.com/r/jtech/react-typescript, into Kubernetes.
1 | 𝜆 kubectl run react-typescript --image=jtech/react-typescript --port 3000 |
Expose service:
1 | 𝜆 kubectl expose deployment react-typescript --type="NodePort" |
Run kubectl proxy
and connect to react-typscript
application on URL: http://localhost:8001/api/v1/namespaces/default/services/http:react-typescript:3000/proxy/
References
eksctl
, a simple CLI tool for creating clusters on Amazon’s new managed Kubernetes service for EC2 - EKS. Written in Go, uses CloudFormation, https://eksctl.io/- AWS EKS, https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html
- Tutorial: Deploy Kubernetes Dashboard, https://docs.aws.amazon.com/eks/latest/userguide/dashboard-tutorial.html