...
The procedure has been tested on a ubuntu 22.04LTS 64GB Ram.
Install Helm
General instruction for helm: https://helm.sh/docs/intro/install/
Extracted info for Debian/Ubuntu
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.
...
https://<Node_IP>:<NodePort>
Get Admin Token for Access
To access the Dashboard, you will need a token. Create a ServiceAccount and ClusterRoleBinding for full admin access.
...
kubectl create token -n kubernetes-dashboard dashboard-admin
Install MetalLB
a. Create a Namespace for MetalLB
It’s a good practice to create a separate namespace for MetalLB:
kubectl create namespace metallb-system
b. Apply the MetalLB Manifest
Run the following command to deploy MetalLB using its official manifest:
...
Make sure to check for the latest version of MetalLB on the MetalLB GitHub Releases page.
c. Check MetalLB Pods
Verify that the MetalLB components are running:
...
You should see controller
and speaker
pods running.
Configure MetalLB
MetalLB needs a configuration to specify which IP address range to use for load balancing. You can create a ConfigMap with the configuration.
a. Define the IP Address Range
Create a YAML file named metallb-config.yaml
with the following content, adjusting the ipAddressPool
to match your network setup. For example:
...
Make sure the IP range specified is within your local network range and does not conflict with existing devices.
b. Apply the ConfigMap
Apply the configuration:
kubectl apply -f metallb-config.yaml
c. Advertise choosen addresses
Create a YAML file named metallb-advertise.yaml
:
...
kubectl apply -f
metallb-advertise.yaml
d. Check ingress (traefik) gets loadbalancer address of the machine
kubectl get services -A
Install ArgoCD
Before installing ArgoCD, create a namespace where ArgoCD resources will live:
kubectl create namespace argocd
Install ArgoCD Using the Official Manifests
ArgoCD is installed by applying a YAML manifest. The official manifest deploys all necessary ArgoCD components, such as the API server, controller, and UI.
...
This command will install ArgoCD into the argocd
namespace.
Check the ArgoCD Pods
After applying the manifest, you can check if the ArgoCD pods are running:
...
Wait for everything ready.
Expose the ArgoCD Server
By default, the ArgoCD API server is only accessible inside the cluster. To access it externally, you can expose it using either a NodePort
or LoadBalancer
service. For a minimal installation like K3s, NodePort
is typically used.
a. Expose ArgoCD with a NodePort:
Run this command to patch the argocd-server
service to be of type NodePort
:
...
Node_IP
= address/dns of the machine where is installed k3s
Get the ArgoCD Initial Admin Password
ArgoCD generates a default admin password during installation. You can retrieve it by running this command:
...
The username is admin
, and the password is what you just retrieved.
Access the ArgoCD Web UI
- URL:
http://<Node_IP>:<NodePort>
orhttp://<LoadBalancer_IP>
- Username:
admin
- Password: Use the password retrieved in the previous step.
Apply the Proxy Settings (optional)
You can edit the ArgoCD deployment to add the necessary environment variables to the containers.
...
Code Block | ||||
---|---|---|---|---|
| ||||
env: - name: HTTP_PROXY value: "http://squid.lnf.infn.it:3128" - name: HTTPS_PROXY value: "http://squid.lnf.infn.it:3128" - name: NO_PROXY value: "baltig.infn.it,argocd-repo-server,argocd-server,localhost,127.0.0.0/24,::1,*.lnf.infn.it,.svc,.cluster.local,10.0.0.0/8,192.168.0.0/16" |
Restart the ArgoCD Components
After updating the deployments, restart the affected components to apply the changes:
...