...
The procedure has been tested on a ubuntu 22.04LTS 64GB Ram.
Install microk8s
If you haven't installed microk8s
yet, you can install it by running the following command:
...
Code Block | ||||
---|---|---|---|---|
| ||||
microk8s enable dns microk8s status --wait-ready microk8s enable hostpath-storage microk8s enable metallb # Make sure the IP range specified is within your local network range and does not conflict with existing devices. microk8s enable ingress microk8s enable dashboard microk8s kubectl describe secret -n kube-system microk8s-dashboard-token ## copy the token for k8s dashboard microk8s enable community microk8s enable argocd alias kubectl='microk8s kubectl' kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d ## get the token for argocd |
NOTE: the alias command should (must) be inserted under ~/.bashrc
if you don't define the alias, remember to explain the command microk8s kubectl
or sudo microk8s kubectl
in the following steps
REFERENCES:
Explore the microk8s environment
You can verify the K3s installation by checking the node status:
...
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:
kubectl patch svc
argokubernetes-
cddashboard -
argocd-server -n argocd n kube-system -p '{"spec": {"type": "NodePort"}}'
kubectl get svc kubernetes-dashboard -kong-proxy -n kuberneteskube-systemdashboard
Look for the the NodePort
value under the PORT(S)
column. You can now access the K8s Dashboard web UI at
...
Run this command to patch the argocd-server
service to be of type NodePort
:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
or
kubectl patch svc argo-cd-argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
To retrieve the NodePort, run the following command:
kubectl get svc -n argocd argocd-server
or
kubectl get svc -n argocd argo-cd-argocd-server
Look for the NodePort
value under the PORT(S)
column. You can now access the ArgoCD web UI at
...