Amazon Elastic Kubernetes Service Hands-On
Demo
Create EKS Cluster Role
Create IAM Role
EKS-Cluster-Role
Name
Create EKS Cluster Node Group Role
Create Role
AmazonEKS_CNI_Policy
Add Permissions - 1
AmazonEC2ContainerRegistryReadOnly
Add Permissions - 2
AmazonEKSWorkerNodePolicy
Add Permissions - 3
AmazonEKSNodeRole
Name
Create
Create EKS Demo Cluster
demo-eks-cluster
Configure cluster
Select Subnets
Review and create
After Create
Create EKS Cluster Node Group
Add Node Group
one
Configure Node Group
1
Select Subnets
Review and create
Step 2: Compute and scaling configuration
Create
Wait for Ready State
AWS CloudShell
Commands - 1
aws eks update-kubeconfig --name demo-eks-cluster
kubectl config get-contexts
kubectl get nodes
aws sts get-caller-identity
kubectl get pods -A
kubectl config use-context arn:aws:eks:us-east-1:211125437318:cluster/demo-eks-cluster
Optional
Commands - 2
cat > nginx-deployment.yaml << EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 80
EOF
kubectl apply -f nginx-deployment.yaml
Commands - 3
kubectl get deployments
kubectl get pods
kubectl get services nginx-service
Copy
Test
Clean Up
kubectl delete -f nginx-deployment.yaml
Delete Node Group
Delete Demo EKS Cluster
Delete EKS Node Role
Delete EKS Cluster Role
🙏
Thanks
for
Watching
Amazon Elastic Kubernetes Service - Hands-On Demo
By Deepak Dubey
Amazon Elastic Kubernetes Service - Hands-On Demo
Amazon Elastic Kubernetes Service - Hands-On Demo
- 106