Route consul API hostname to the HTTP API (8500) #282

Merged
benvin merged 2 commits from benvin/consul-api-route into main 2026-07-25 18:19:39 +10:00
3 changed files with 30 additions and 4 deletions
Showing only changes of commit 3d2bdec0b8 - Show all commits
+4 -4
View File
@@ -46,8 +46,8 @@ spec:
- backendRefs:
- group: ""
kind: Service
name: consul-ui
port: 80
name: consul-http
port: 8500
weight: 1
matches:
- path:
@@ -74,8 +74,8 @@ spec:
- backendRefs:
- group: ""
kind: Service
name: consul-ui
port: 80
name: consul-http
port: 8500
weight: 1
matches:
- path:
+1
View File
@@ -6,5 +6,6 @@ resources:
- namespace.yaml
- gateway.yaml
- httproute.yaml
- service.yaml
- vaultauth.yaml
- vaultstaticsecret.yaml
+25
View File
@@ -0,0 +1,25 @@
---
# ClusterIP service targeting the consul server pods' HTTP API (8500).
# The HashiCorp chart only ships consul-ui (also 8500 via the server pods)
# and the headless consul-server; this named service gives the Gateway a
# stable API backend. Consul serves both the HTTP API and the UI (at /ui/)
# on this same port, so routing the API hostname here preserves the UI too.
apiVersion: v1
kind: Service
metadata:
name: consul-http
namespace: consul
labels:
app.kubernetes.io/name: consul
app.kubernetes.io/instance: consul
spec:
type: ClusterIP
selector:
app: consul
component: server
release: consul
ports:
- name: http
port: 8500
protocol: TCP
targetPort: 8500