Then, create a TCP load balancer and an UDP load balancer. Natually, I use the same IP address for both of them. WIth Metallb, just add the allow-share-ip annotation.
For the ports that you want to expose, check this list.
apiVersion:apps/v1kind:Deploymentmetadata:name:unifinamespace:unifispec:selector:matchLabels:app:unifi# it appears unifi-controller will deadlock on the files# if there's another instance running. therefore, set both replicas# and maxUnavailable to 1 so there's always one and only one running.replicas:1strategy:type:RollingUpdaterollingUpdate:maxSurge:1maxUnavailable:1template:metadata:labels:app:unifispec:containers:- name:unifi-controllerimage:lscr.io/linuxserver/unifi-controller:7.3.83imagePullPolicy:IfNotPresentports:- containerPort:8443name:web-ui- containerPort:3478protocol:UDPname:stun- containerPort:10001protocol:UDPname:ap-discovery- containerPort:8080name:device-inform- containerPort:1900protocol:UDPname:ssdp- containerPort:6789name:mob-speedtestenv:# the user with this PUID and GUID should have# read/write permission to access the storage- name:PUIDvalue:"1000"- name:PGIDvalue:"1000"- name:TZvalue:America/Los_Angelesresources:limits:cpu:2memory:1Girequests:cpu:200mmemory:256MilivenessProbe:tcpSocket:port:device-informinitialDelaySeconds:60periodSeconds:10readinessProbe:httpGet:scheme:HTTPSpath:/port:web-uiinitialDelaySeconds:30periodSeconds:10volumeMounts:- name:configmountPath:/configvolumes:- name:configpersistentVolumeClaim:claimName:unifi-pvc
If the Unifi Controller is not newly set up – meaning there’s an existing one that manages all the Unifi devices already. After restoring or migrating the config over, all the Unifi devices will be shown as “Offline” status on the new Controller. This is because these devices are still trying to communicate with the old Controller.
In this case, you need to ssh into each Unifi device and ask them to report to the new Controller.
1
set-inform http://<new-controller-ip>:8080/inform
Note, the username and password could have been changed in “System” -> “Advanced”: