Versions Compared

Key

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

Table of Contents


The procedure has been tested on a ubuntu 22.04LTS 64GB Ram.

Install Helm

https://helm.sh/docs/intro/install/

From Apt (Debian/Ubuntu)

Members of the Helm community have contributed a Helm package for Apt. This package is generally up to date.

curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null sudo apt-get install apt-transport-https --yes echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update sudo apt-get install helm


Install K3s


If you haven't installed K3s yet, you can install it by running the following command:

...

You can verify the K3s installation by checking the POD status:

kubectl get pod -A

Install K8s Dashboard 

You can expose the Dashboard using a NodePort, Ingress, or LoadBalancer service, depending on your setup. By default, it uses a ClusterIP, which is not accessible externally.

To use NodePort, you can add the following to your Helm install command:


export KUBECONFIG=/etc/rancher/k3s/k3s.yaml 

helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard \ --namespace kubernetes-dashboard --create-namespace \ --set service.type=NodePort \ --set service.nodePort=30001 # Specify a custom port, for example 30001

This will expose the Dashboard at the specified NodePort, which you can access at https://<Node-IP>:30001.


Get Admin Token for Access

To access the Dashboard, you will need a token. Create a ServiceAccount and ClusterRoleBinding for full admin access.

Create dashboard_admin.yaml

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


kubectl apply -f dashboard_admin.yaml

To obtain the token:

kubectl create token -n kubernetes-dashboard dashboard-admin



Install MetalLB

a. Create a Namespace for MetalLB

...