mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-11-16 06:29:09 +01:00
home-assistant: replace the ExternalName service with an EndpointSlice
After the microk8s ingress addon went from ingress-nginx 1.8.0 to 1.13.8, ha.rubenhensen.nl returned 503: the controller now resolves externalName as a DNS name and "192.168.1.202" fails the lookup. A selector-less Service with an EndpointSlice pointing at the IP is the supported way to route to an address outside the cluster.
This commit is contained in:
1 parent
2ce9c33dbd
commit
a10dbecc94
1 file changed
+22
-4
@@ -1,10 +1,28 @@
|
|||||||
|
# Home Assistant runs outside the cluster on 192.168.1.202. ingress-nginx
|
||||||
|
# 1.13 resolves an ExternalName as a DNS name and fails on a bare IP, so
|
||||||
|
# point a selector-less Service at it with a hand-written EndpointSlice.
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: home-assistant-external
|
name: home-assistant-external
|
||||||
spec:
|
spec:
|
||||||
type: ExternalName
|
|
||||||
externalName: 192.168.1.202
|
|
||||||
ports:
|
ports:
|
||||||
- port: 8123
|
- name: http
|
||||||
protocol: TCP
|
port: 8123
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8123
|
||||||
|
---
|
||||||
|
apiVersion: discovery.k8s.io/v1
|
||||||
|
kind: EndpointSlice
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-external-1
|
||||||
|
labels:
|
||||||
|
kubernetes.io/service-name: home-assistant-external
|
||||||
|
addressType: IPv4
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8123
|
||||||
|
protocol: TCP
|
||||||
|
endpoints:
|
||||||
|
- addresses:
|
||||||
|
- 192.168.1.202
|
||||||
Reference in new issue
Block a user