eksctl and kubectl are command line tools needed for provisioning AWS EKS clusters and managing them download them from respective sites
eksctl create cluster \
--version 1.14 \
--region us-west-2 \
--node-type t3.medium \
--nodes 3 \
--nodes-min 1 \
--nodes-max 4 \
--name my-demo
aws eks update-kubeconfig --region region-code --name cluster-name
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-kubernetes
spec:
replicas: 3
selector:
matchLabels:
app: hello-kubernetes
template:
metadata:
labels:
app: hello-kubernetes
spec:
containers:
- name: hello-kubernetes
image: paulbouwer/hello-kubernetes:1.5
ports:
- containerPort: 8080
kubectl apply -f hello-k8s-deploy.yaml
---
apiVersion: v1
kind: Service
metadata:
name: hello-kubernetes
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: hello-kubernetes
kubectl apply -f hello-k8s-svc.yaml