如何解决“插件-http-application-routing-nginx-ingress-controller”的问题未找到端点
我有一个掌舵图,用于在 AKS 中部署我的服务。当我在 AKS 中部署对象时,我可以在入口控制器 pod 的日志中看到似乎没有为我的服务创建任何端点,但事实并非如此,因为我可以看到集群中的端点。我可以看到服务“mynamespace/myprojectname-mynamespace-svc”没有任何活动端点
有人可以帮我吗?谢谢!!
信息在这里
python-version: '^3.6'
的输出
helm install myservice --dry-run --debug./myfirst-backend-project/ --values values.yaml
# Source: myfirst-backend-project/templates/namespace.yml
apiVersion: v1
kind: Namespace
Metadata:
name: mynamespace
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
---
# Source: myfirst-backend-project/templates/secret.yaml
apiVersion: v1
kind: Secret
Metadata:
namespace: mynamespace
name: myprojectname-mynamespace-secrets
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
type: Opaque
stringData:
application-secrets.yml: |-
my-property:
secrets: my value
---
# Source: myfirst-backend-project/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
Metadata:
namespace: mynamespace
name: myprojectname-mynamespace-configmap
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
data:
application-configmap.yml: |-
my-property:
configmap: my value
---
# Source: myfirst-backend-project/templates/service.yaml
apiVersion: v1
kind: Service
Metadata:
namespace: mynamespace
name: myprojectname-mynamespace-svc
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
---
# Source: myfirst-backend-project/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
Metadata:
namespace: mynamespace
name: myprojectname-mynamespace-depl
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
template:
Metadata:
labels:
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
spec:
serviceAccountName: default
securityContext:
{}
containers:
- name: myfirst-backend-project
env:
- name: "JAVA_TOOL_OPTIONS"
value: "-Dspring.config.additional-location=file:/opt/conf/ -Dspring.profiles.active=configmap,secrets -Dlogging.path=/opt/logs/ -Dspring.application.name=myprojectname-mynamespace"
securityContext:
{}
image: "mytestcontainerregistry2021.azurecr.io/samples/democicd:latest"
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
protocol: TCP
lifecycle:
preStop:
exec:
command: ["sh","-c","sleep 10"]
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
volumeMounts:
- name: configmap-volume
mountPath: /opt/conf/application-configmap.yml
subPath: application-configmap.yml
readOnly: true
- name: secrets-volume
mountPath: /opt/conf/application-secrets.yml
subPath: application-secrets.yml
readOnly: true
resources:
{}
volumes:
- name: configmap-volume
configMap:
name: myprojectname-mynamespace-configmap
- name: secrets-volume
secret:
secretName: myprojectname-mynamespace-secrets
---
# Source: myfirst-backend-project/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
Metadata:
namespace: mynamespace
name: myprojectname-mynamespace-ing
labels:
helm.sh/chart: myfirst-backend-project-0.1.0
app.kubernetes.io/name: mynamespace
app.kubernetes.io/instance: myprojectname-mynamespace
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
spec:
rules:
- host: myprojectname-mynamespace.b36c8e3faf88_omitedsomedigits.southcentralus.aksapp.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myprojectname-mynamespace-svc
port:
number: 80
的输出
kubectl get endpoints,pod,svc,deployment,ing -n mynamespace
Warning: extensions/v1beta1 Ingress is deprecated in v1.14+,unavailable in v1.22+; use networking.k8s.io/v1 Ingress
NAME ENDPOINTS AGE
endpoints/myprojectname-mynamespace-svc 10.244.0.78:8080,10.244.0.79:8080 60s
NAME READY STATUS RESTARTS AGE
pod/myprojectname-mynamespace-depl-7dcc556694-5mhpg 1/1 Running 0 60s
pod/myprojectname-mynamespace-depl-7dcc556694-9s69b 1/1 Running 0 60s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/myprojectname-mynamespace-svc LoadBalancer 10.0.232.21 20.xxx.xx.211 80:31568/TCP 60s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/myprojectname-mynamespace-depl 2/2 2 2 60s
NAME CLASS HOSTS ADDRESS PORTS AGE
ingress.extensions/myprojectname-mynamespace-ing <none> myprojectname-mynamespace.b36c8e3faf88_omitedsomedigits.southcentralus.aksapp.io 80 60s
的输出
kubectl logs -f deploy/addon-http-application-routing-nginx-ingress-controller -n kube-system
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。