'Adopting Unifi devices on Kubernetes
I have put a unifi controller online in digitalocean k8s which works. Unfortunately I can't adopt any devices to it. When I SSH into the device and set the inform to the controller on http://unifi."domain".net:8080/inform
it doesn't show up. I have also tried some different combinations for the URL. Here are my configs. I hope some of you have some suggestions.
apiVersion: v1
kind: Service
metadata:
name: unifi-service
namespace: unifi-ns
spec:
selector:
app: unifi
ports:
- port: 443 # Default port for image
targetPort: 8443
name: https
protocol: TCP
- port: 8080
name: inform
protocol: TCP
- port: 6789
name: ubnt-6789
protocol: TCP
- port: 8443
name: ubnt-8443
protocol: TCP
- port: 3478
name: ubnt-3478
protocol: UDP
- port: 8881
name: ubnt-8881
protocol: TCP
- port: 8882
name: ubnt-8882
protocol: TCP
- port: 10001
name: ubnt-10001
protocol: UDP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: unifi-ingress
namespace: unifi-ns
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
tls:
- hosts:
- unifi."domain".net
secretName: unifi-tls
rules:
- host: unifi."domain".net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: unifi-service
port:
number: 443
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: unifi-set
namespace: unifi-ns
spec:
selector:
matchLabels:
app: unifi
serviceName: "unifi-service"
replicas: 1
template:
metadata:
labels:
app: unifi
spec:
containers:
- name: unifi
image: jacobalberty/unifi
volumeMounts:
- name: unifi-pvc
mountPath: /unifi
ports:
- containerPort: 6789
name: ubnt-6789
protocol: TCP
- containerPort: 8080
name: ubnt-8080
protocol: TCP
- containerPort: 8443
name: ubnt-8443
protocol: TCP
- containerPort: 3478
name: ubnt-3478
protocol: UDP
- containerPort: 8881
name: ubnt-8881
protocol: TCP
- containerPort: 8882
name: ubnt-8882
protocol: TCP
- containerPort: 10001
name: ubnt-10001
protocol: UDP
volumeClaimTemplates:
- metadata:
name: unifi-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: do-block-storage
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
