Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the master node ip address and the exposed port :http://<master-node-ip-address>:<exposed-port>


6) Fix access privilage issueGrant full admin privilages to Dashboard Service Account

The browser does not ask for credentials to login. The default user is "system:serviceaccount:kube-system:kubernetes-dashboard" , which does not have access to the default namespace.

TODO:

To fix this, create a new "ClusterRoleBinding" and provide privilages to Dashboard Service Account.

Create the following yaml file and deploy it1) Manually add credentials (username/password = admin/admin) to ~/.kube/config on the master node

Code Block
ubuntu@k8s-s1-master:~$ kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: REDACTED
server: https://10.147.112.156:6443
name: kubernetes-s1
contexts:
- context:
cluster: kubernetes-s1
user: kubernetes-admin-s1
name: kubernetes-admins1
current-context: kubernetes-admins1
kind: Config
preferences: {}
users:
- name: kubernetes-admin-s1
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
password: admin
username: admin
ubuntu@k8s-s1-master:~$

titledashboard-admin.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: kubernetes-dashboard
  labels:
    k8s-app: kubernetes-dashboard
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: kubernetes-dashboard
  namespace: kube-system




~$ kubectl create -f dashboard-admin.yaml
clusterrolebinding "kubernetes-dashboard" created
~$


7) Navigate to UI via a browser

You can access the browser , without any credentials. 

Image AddedFind a way (??) to get UI ask for credentials.