k8s ingress <error: endpoints “default-http-backend“ not found>

本文讲述了如何处理Kubernetes Ingress中default-http-backend找不到的问题,通过实例和StackOverflow解答,探讨了设置默认后端服务的方法。
[root@k8s-node-01 traefix-ingress]# kubectl describe ingress ingress-test  -n ingress-nginx
Name:             ingress-test
Namespace:        ingress-nginx
Address:
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
  Host             Path  Backends
  ----             ----  --------
  org.ingress.com
                   /   nginx-service-nodeport:80 (10.244.0.249:80,10.244.0.250:80)
Annotations:       kubernetes.io/ingress.class: nginx
                   nginx.ingress.kubernetes.io/use-regex: true
Events:
  Type    Reason  Age    From                      Message
  ----    ------  ----   ----                      -------
  Normal  Sync    9m42s  nginx-ingress-controller  Scheduled for sync
[root@k8s-node-01 traefix-ingress]#

在这里插入图片描述
########## 未成功 ###########

https://stackoverflow.com/questions/63558461/endpoints-default-http-backend-not-found-in-ingress-resource

在这里插入图片描述

在这里插入图片描述

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: default-backend-ingress-example
spec:
  defaultBackend:
    service:
      name: hotel-svc
      port:
        number: 80

########## 继续尝试这个方法 ###########

---->>>>> https://forum.linuxfoundation.org/discussion/858210/lab-7-2

[root@k8s-master ~]# helm install new-ingress-name ./ingress-nginx-4.11.3.tgz \ > --namespace ingress-nginx \ > --create-namespace \ > --timeout 10m \ > --set controller.admissionWebhooks.enabled=false NAME: new-ingress-name LAST DEPLOYED: Fri Sep 26 16:00:22 2025 NAMESPACE: ingress-nginx STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: The ingress-nginx controller has been installed. It may take a few minutes for the load balancer IP to be available. You can watch the status by running 'kubectl get service --namespace ingress-nginx new-ingress-name-ingress-nginx-controller --output wide --watch' An example Ingress that makes use of the controller: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example namespace: foo spec: ingressClassName: nginx rules: - host: www.example.com http: paths: - pathType: Prefix backend: service: name: exampleService port: number: 80 path: / # This section is only required if TLS is to be enabled for the Ingress tls: - hosts: - www.example.com secretName: example-tls If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided: apiVersion: v1 kind: Secret metadata: name: example-tls namespace: foo data: tls.crt: <base64 encoded cert> tls.key: <base64 encoded key> type: kubernetes.io/tls [root@k8s-master ~]# helm install new-ingress-name ./ingress-nginx-4.11.3.tgz \ > --set controller.image.repository=registry.aliyuncs.com/google_containers/nginx-ingress-controller \ > --set controller.image.tag=v1.5.1 \ > --set controller.image.digest="" Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "new-ingress-name-ingress-nginx" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "default": current value is "ingress-nginx"
最新发布
09-27
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值