У меня есть определение входа в Kubernetes.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: dev
annotations:
kubernetes.io/ingress.class: nginx
#nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- hosts:
- xyz.org
secretName: ingress-tls
rules:
- host: xyz.org
http:
paths:
- path: /configuration/*
backend:
serviceName: dummysvc
servicePort: 80
Мне нужно, чтобы всякий раз, когда я нажимал на URL: https://example.com/configuration/, он должен идти к какому-то файлу или некоторому объекту, который служба отправляет в ответ, но этого не происходит, это выдает мне страницу с ошибкой«Не найдена веб-страница для указанного адреса». Это проблема с входом ??
Ниже приведена моя спецификация службы:
apiVersion: v1
kind: Service
metadata:
name: dummysvc
spec:
#type: LoadBalancer
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: configurationservice
Ниже приведена моя спецификация развертывания :
apiVersion: apps/v1
kind: Deployment
metadata:
name: dummy-deployment
labels:
app: configurationservice
spec:
replicas: 3
selector:
matchLabels:
app: configurationservice
template:
metadata:
labels:
app: configurationservice
spec:
volumes:
- name: appinsights
secret:
secretName: appinsightngm-secrets
- name: cosmosdb
secret:
secretName: cosmosdbngm-secrets
- name: blobstorage
secret:
secretName: blobstoragengm-secrets
- name: azuresearch
secret:
secretName: azuresearchngm-secrets
containers:
- name: configurationservice
image: xyz.azurecr.io/xyz.configurationservice:develop
imagePullPolicy: Always
ports:
- containerPort: 80
volumeMounts:
- name: appinsights
mountPath: "/appinsights/"
readOnly: true
- name: cosmosdb
mountPath: "/cosmosdb/"
readOnly: true
- name: blobstorage
mountPath: "/blobstorage/"
readOnly: true
- name: azuresearch
mountPath: "/azuresearch/"
readOnly: true
---
apiVersion: v1
kind: Service
metadata:
name: dummysvc
spec:
#type: LoadBalancer
type: NodePort
ports:
- port: 80
targetPort: 80
protocol: TCP
selector:
app: configurationservice