You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Install K3s


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


curl -sfL https://get.k3s.io | sh -

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

kubectl get nodes

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:


kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml

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:

kubectl get pods -n metallb-system

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:

Create MetalLB configuration
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    layer2:
      addresses:
      - 192.168.114.200-192.168.114.210


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 :

Create MetalLB configuration
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
  name: example
  namespace: metallb-system
spec:
  ipAddressPools:
  - first-pool


kubectl apply -f metallb-advertise.yaml



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.

Run the following command to install ArgoCD:


kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

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:

kubectl get pods -n argocd

You should see several pods, including argocd-server, argocd-repo-server, argocd-application-controller, and others.

Wait for everything ready.


5.

  • No labels