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

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay