Deploying a Kubernetes dashboard
Now, it’s time to install a Kubernetes dashboard. The next steps are based on the official K3s documentation. To start installing the dashboard, follow these steps:
Install the dashboard using the following commands:
$ GITHUB_URL=https://github.com/kubernetes/dashboard/releases $ VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||') $ sudo k3s kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
This is going to install the dashboard, but you need to configure how to access this dashboard.
Create the
dashboard-admin-user.yaml
file to create a service account that provides access to your dashboard. The content of this file will be as follows:apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard Now create the file dashboad-admin-user-role.yaml....