I'm trying to add an spring boot admin interface to some microservice that are deployed in kubernetes cluster. the spring boot admin app has the following configuration:
spring:
application:
name: administrator-interface
boot:
admin:
context-path: "/ui"
server:
use-forward-headers: true
The kubernetes cluster has an ingress that works as an api gateway:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /admin/(.+)
backend:
serviceName: administrator-interface-back
servicePort: 8080
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
when I try to see the spring boot admin ui I had the following error:
URL in explorer: https://XXXXXX(thisisgivenBYDNS)/admin/ui
GET https://XXXXXX/ui/assets/css/chunk-common.6aba055e.css net::ERR_ABORTED 404
The URL is wrong because it should be https://XXXXXX/admin/ui/assets/css/chunk-common.6aba055e.css
It is not adding the /admin path that is given by the ingess
How can i solve this and configure an aditional path to serve the static content in the request from the right URL?
Thanks in advance
/
/ui
or/admin/ui
?? – Will R.O.F.