Ready to Experiment on a local EKS Instance in Minutes

Photo by Agê Barros on Unsplash

Experimenting with EKS

How to setup an EKS cluster in minutes

Install the EKS cluster

# snap install eks --classic --edge
# eks start
# eks status
eks is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none

Join the nodes to the cluster

# eks add-node
From the node you wish to join to this cluster, run the following:
eks join 192.168.121.143:25000/b109c7b9c935ff34c694f46eb2e868b1
If the node you are adding is not reachable through the default interface you can use one of the following:
eks join 192.168.121.143:25000/b109c7b9c935ff34c694f46eb2e868b1
eks join 172.28.128.184:25000/b109c7b9c935ff34c694f46eb2e868b1
eks join 10.1.5.0:25000/b109c7b9c935ff34c694f46eb2e868b1
# eks join 192.168.121.143:25000/b109c7b9c935ff34c694f46eb2e868b1
Contacting cluster at 192.168.121.143
Waiting for this node to finish joining the cluster. ..

Configure kubectl to work with the cluster

# eks config
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURBVENDQWVtZ0F3SUJBZ0lKQVBFV3hKU1BLTGFHTUEwR0NTc...hNllSOUUra0RabDBKS0crRGdJQ3BjMW9TanUKVG9GZjBmST0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
server: https://192.168.121.142:16443
name: microk8s-cluster
contexts:
- context:
cluster: microk8s-cluster
user: admin
name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
user:
token: Y2R3bTRzUDdsRlhzY0pnbFJ2VnU2UVpmR21jYWJ5R2szRGI2TkpiakpOTT0K
# kubectl config set-cluster experimental \
--server=https://192.168.121.45:16443 \
--insecure-skip-tls-verify=true
# kubectl config set-credentials exp-admin \
--token=cWZjZUV6QVpEaWZlbzBoUzQxdzJocnZiTHhESStwLzNzbk5aQ09BWnVzYz0K
# kubectl config set-context experimental \
--user=exp-admin \
--cluster=experimental
# kubectl config use-context experimental
# kubectl cluster-info
Kubernetes master is running at https://192.168.121.45:16443
CoreDNS is running at https://192.168.121.45:16443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://192.168.121.45:16443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Problemsolver & Lifehacker | Photo by Alin Rusu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store