Kubernetes

Kubernetes Unifi Network Proxy

When you are using an Unifi Cloudkey or Unifi Network controller outside your kubernetes clusters you maybe want to create an reverse proxy to your installation to make your Unifi Network controller public.

Create an Service and Endpoint with the same name. 

				
					apiVersion: v1
kind: Endpoints
metadata:
  name: unifi-network
subsets:
  - addresses:
      - ip: 192.168.1.5
    ports:
      - port: 8443
---
apiVersion: v1
kind: Service
metadata:
  name: unifi-network
spec:
  ports:
    - port: 8443
      protocol: TCP
      targetPort: 8443
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/issuer: stephan-at-monkeysoft-nl
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
  name: unifi-network
spec:
  ingressClassName: nginx
  rules:
    - host: unifi.eizinga.info
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: unifi-network
                port:
                  number: 8443
  tls:
    - hosts:
        - unifi.eizinga.info
      secretName: unifi-eizinga-info

				
			

Author

Stephan Eizinga

Leave a comment

Your email address will not be published. Required fields are marked *