In this lab we are going to install and configure an MQTT Workload to run on k3s or RKE cluster
There are 2 methods provided to install MQTT, the Easy Method with Rancher and Helm, or the Manual Method which include the needed yaml files.
Rancher
Kubernetes Cluster
Default StorageClass
LoadBalancer
Select App & Marketplace -> Chart Repositories
Name: k8s-at-home
Index url: https://k8s-at-home.com/charts/
Click on Values YAML and change the following items
service:
main:
type: LoadBalancer
For x86
kubectl create -f mosquitto-deployment.yaml
For Raspberry Pi
kubectl create -f mosquitto-Raspberry-Pi-deployment.yaml
kubectl create -f mosquitto-service.yaml
kubectl get svc mosquitto
Example:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
mosquitto LoadBalancer 10.43.175.123 10.0.9.102 1883:30690/TCP 87s
This example tells us that Mosquitto is now available on 10.0.9.102 on port 1883