Hi friends,
Having a simple UI access issue:
I know (from documentation) that when ha
is enabled, then ingress points to vault-active
service automatically. I need HA enabled as I am using consul as a backend for vault.
But, how can I use ingress (even a separate new one) to point to vault-ui
service so that I can access it on myvault.mywebsite.com/ui ?
I tried many things but didn’t get any success.
Please help.
Vault chart version: vault-0.21.0
Vault App version: 1.11.2
Kubectl version:
- Client: Major:“1”, Minor:“21”, GitVersion:“v1.21.10”
- Server: Major:“1”, Minor:“21”, GitVersion:“v1.21.10”
Here’s my values.yaml and ingress yaml file:
> server:
> ha:
> enabled: true
> replicas: 3
> config: |
> ui = true
> storage "consul" {
> path = "vault"
> address = "myconsul.mywebsite.com:8500"
> }
> ingress:
> enabled: true
> ui:
> enabled: true
This creates default nginx ingress rule that points to vault-active
service.
Now, if I create following separate ingress object, the nginx rejects it as the host name is same and if I change the hostname, nginx accepts it but I get 502: Bad Gateway
error when I visit myvault.mywebsite.com
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: vault-ingress
namespace: vault
spec:
ingressClassName: nginx
rules:
- host: myvault.mywebsite.com
http:
paths:
- path: /
backend:
serviceName: vault-ui
servicePort: 80
Please help.