DEV Community

Hisyam Johan
Hisyam Johan

Posted on

1

K8s Dashboard on OKE

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
Enter fullscreen mode Exit fullscreen mode

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/

paste the token created. Have fun!
source1 source2

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)