Bismillah...
We will learn on how to deploy and access Kubernetes (K8s) Dashboard in Oracle Kubernetes Engine (OKE).
First, we will create filename oke-k8s-dashboard-auth.yaml with below details:
apiVersion: v1
kind: ServiceAccount
metadata:
name: oke-admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: oke-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: oke-admin
namespace: kube-system
---
apiVersion: v1
kind: Secret
metadata:
name: oke-admin-sa-token
namespace: kube-system
annotations:
kubernetes.io/service-account.name: oke-admin
type: kubernetes.io/service-account-token
Execute this command
kubectl apply -f oke-k8s-dashboard-auth.yaml
This command will create ServiceAccount, ClusterRoleBinding and Secret.
Execute this command to view token created for auth used later.
kubectl describe secrets oke-admin-sa-token -n kube-system
Then execute this to deploy Kubernetes Dashboard.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
To run it on your local, run kubectl proxy
It now accessible at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Top comments (0)