Skip to content

Try to install various apps on Docker Compose or Docker K8s

License

Notifications You must be signed in to change notification settings

rbreunung/k8s-experiments

Repository files navigation

Access to Kubernetes Dashboard

After installing Kubernetes on the Mac as a feature of Docker Desktop no overview UI is present.

Installing Kubernetes Dashboard

The following Dashboard Guide shows how to install the Kubernetes Dashboard.

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

In the next step the tutorial expects to create a bearer token. We need a service account for this and follow the Tutorial.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard

This account can access the dashboard but will have restricted function. As described in the tutorial we need to bind the correct role.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kubernetes-dashboard

Each of the .yaml are present in this folder and can can be applied via kubectl apply -f <file>.

The token can be generated using the following command.

kubectl -n kubernetes-dashboard create token admin-user

Token is persistent in BitWarden.

Access Dashboard

We assume only the install tutorial has been followed and no additional NodePort has been created.

First we need to expose Kubernetes API to this system.

kubectl proxy

Assuming exposition port 8001 you will find the dashboard login page on this Link.

Test NodePort

I use a test-nginx-deployment.yaml to test a first NodePort exposed by Docker Desktop from Kubernetes.

The port will be generated by random and exposed to the localhost system.

About

Try to install various apps on Docker Compose or Docker K8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published