DEV Community

PanupongDeve
PanupongDeve

Posted on

2

[AWS EKS] Setup Kubenetes Dashboard

step 0 - install package in linuux

sudo apt install jq curl

step 1 - deploy the K8s Metrics Server

DOWNLOAD_URL=$(curl --silent "https://api.github.com/repos/kubernetes-sigs/metrics-server/releases/latest" | jq -r .tarball_url)

DOWNLOAD_VERSION=$(grep -o '[^/v]*$' <<< $DOWNLOAD_URL)


curl -Ls $DOWNLOAD_URL -o metrics-server-$DOWNLOAD_VERSION.tar.gz


mkdir metrics-server-$DOWNLOAD_VERSION


tar -xzf metrics-server-$DOWNLOAD_VERSION.tar.gz --directory metrics-server-$DOWNLOAD_VERSION --strip-components 1


kubectl apply -f metrics-server-$DOWNLOAD_VERSION/deploy/1.8+/

step 2 - deploy the K8s dashboard

latest release of v2.xxx here: https://github.com/kubernetes/dashboard/releases


export DASHBOARD_RELEASE={{ latest releaseversion }}


kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/$DASHBOARD_RELEASE/aio/deploy/recommended.yaml


kubectl apply -f admin-service-account.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
name: eks-dashboard-admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: eks-dashboard-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: eks-dashboard-admin
namespace: kube-system

step 3 - access the dashboard


kubectl -n kube-system describe secret $(kubectl -n kube-system get secret| grep {{ service_account_name }} | awk '{print $1}')

copy token


kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'

open browser


http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#!/login

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay