简体   繁体   English

nginx 入口没有 controller 服务

[英]nginx ingress no controller service

Helo guys I'd like some help with an issue: I'm using a kubernetes cluster that is provided to me by rancher (so I did not configured it) Helo 伙计们,我需要一些帮助来解决一个问题:我正在使用 Rancher 提供给我的 kubernetes 集群(所以我没有配置它)

but it has an nginx ingress controller:但它有一个 nginx 入口 controller:

 kubectl -n ingress-nginx get all -o wide
NAME                                        READY   STATUS    RESTARTS   AGE   IP               NODE                           NOMINATED NODE   READINESS GATES
pod/default-http-backend-598b7d7dbd-fgpns   1/1     Running   3          48d   192.168.121.64   pr-k8s-fe-fastdata-worker-02   <none>           <none>
pod/nginx-ingress-controller-72d8s          1/1     Running   0          6d    172.34.10.123    pr-k8s-fe-fastdata-worker-03   <none>           <none>
pod/nginx-ingress-controller-rn4fw          1/1     Running   0          6d    172.34.10.192    pr-k8s-fe-fastdata-worker-01   <none>           <none>
pod/nginx-ingress-controller-v2m8b          1/1     Running   0          6d    172.34.10.173    pr-k8s-fe-fastdata-worker-02   <none>           <none>

NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE   SELECTOR
service/default-http-backend   ClusterIP   192.168.33.89   <none>        80/TCP    48d   app=default-http-backend

NAME                                      DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE   CONTAINERS                 IMAGES                                                   SELECTOR
daemonset.apps/nginx-ingress-controller   3         3         3       3            3           <none>          48d   nginx-ingress-controller   rancher/nginx-ingress-controller:nginx-0.35.0-rancher1   app=ingress-nginx

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS             IMAGES                                                         SELECTOR
deployment.apps/default-http-backend   1/1     1            1           48d   default-http-backend   rancher/nginx-ingress-controller-defaultbackend:1.5-rancher1   app=default-http-backend

NAME                                              DESIRED   CURRENT   READY   AGE   CONTAINERS             IMAGES                                                         SELECTOR
replicaset.apps/default-http-backend-598b7d7dbd   1         1         1       48d   default-http-backend   rancher/nginx-ingress-controller-defaultbackend:1.5-rancher1   app=default-http-backend,pod-template-hash=598b7d7dbd

and as I'm watching a video tutorial ( [ Kube 59.1 ] Nginx Ingress in Kubernetes Revisited ) I noticed that he when he display all like me alongside the default backen svc in the ingress namespace he also has an "ingress-controller svc of type load balancer" and I don't, so how can I rectify that?并且当我正在观看视频教程时( [ Kube 59.1] Nginx Ingress in Kubernetes Revisited我注意到当他像我一样在入口命名空间中的默认后端 svc 旁边显示时,他也有一个“ingress-controller”负载均衡器”,但我没有,那我该如何纠正呢? thank you for your help.感谢您的帮助。

Nginx Ingress in Kubernetes Revisited 3:25 --> he sais that nginx-ingress-controller of type LoadBalancer goes from Metallb . Nginx 入口在 Kubernetes 重新访问 3:25 --> 他说LoadBalancer类型nginx-ingress-controller来自Metallb That means he running on-prem cluster, not in cloud.这意味着他运行的是本地集群,而不是云中。 You can install the same using kubeadm您可以使用 kubeadm 安装相同的

MetalLB makes LoadBalancer services: https://metallb.universe.tf/ MetalLB 提供 LoadBalancer 服务: https://metallb.universe.tf/

Kubernetes does not offer an implementation of network load-balancers (Services of type LoadBalancer) for bare metal clusters. Kubernetes 不为裸机集群提供网络负载均衡器(LoadBalancer 类型的服务)的实现。 The implementations of Network LB that Kubernetes does ship with are all glue code that calls out to various IaaS platforms (GCP, AWS, Azure…). Kubernetes 附带的网络 LB 的实现都是调用各种 IaaS 平台(GCP、AWS、Azure ……)的胶水代码。 If you're not running on a supported IaaS platform (GCP, AWS, Azure…), LoadBalancers will remain in the “pending” state indefinitely when created.如果您未在受支持的 IaaS 平台(GCP、AWS、Azure...)上运行,则 LoadBalancers 在创建时将无限期地保留在“待定”的 state 中。

Bare metal cluster operators are left with two lesser tools to bring user traffic into their clusters, “NodePort” and “externalIPs” services.裸机集群运营商剩下两个较小的工具来将用户流量引入他们的集群,“NodePort”和“externalIPs”服务。 Both of these options have significant downsides for production use, which makes bare metal clusters second class citizens in the Kubernetes ecosystem.这两个选项对于生产使用都有明显的缺点,这使得裸机集群成为 Kubernetes 生态系统中的第二个 class 公民。

MetalLB aims to redress this imbalance by offering a Network LB implementation that integrates with standard network equipment, so that external services on bare metal clusters also “just work” as much as possible. MetalLB 旨在通过提供与标准网络设备集成的 Network LB 实现来纠正这种不平衡,以便裸机集群上的外部服务也尽可能“正常工作”。

So I managed to make it work, the nginx that was on my rancher was deployed from the rancher app catalogue, and the field "deploy a service" was set to false, so I upgraded it and put the field to true and it deployed me the load balancing service so now it's working fine.所以我设法让它工作,我的牧场主上的 nginx 是从牧场主应用程序目录中部署的,并且“部署服务”字段设置为 false,所以我升级它并将字段设置为 true,它部署了我负载平衡服务,所以现在它工作正常。 Thank you谢谢

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NGINX Ingress Controller 和默认后端为 nginx 服务的 Ingress 有什么区别? - What is the difference between NGINX Ingress Controller and Ingress with default backend as nginx service? 使用Nginx RBAC入口控制器公开服务的正确方法是哪种? - Which is the proper way to expose a service using the nginx RBAC ingress controller? nginx 入口控制器无法访问后端服务? - nginx ingress controller don't reach backend service? 用于Azure Kubernetes Service 502错误网关的Nginx入口控制器 - nginx-ingress controller for Azure Kubernetes Service 502 Bad Gateway 具有集群 ip 服务和默认 nginx 的 kubernetes 入口控制器无法按预期工作 - kubernetes ingress controller with cluster ip service and default nginx not working as expected 在运行Nginx入口控制器kubernetes时需要服务的(内部)名称 - Want (internal) name for service while running nginx ingress controller kubernetes Nginx 代理到入口 nginx controller - Nginx proxy to ingress nginx controller nginx入口控制器种类之间的区别:服务与种类:入口与种类:Kubernetes中的configMap - Difference between nginx ingress controller kind:service vs kind: Ingress vs kind: configMap in Kubernetes 服务未就绪:gitlab-managed-apps/ingress-nginx-ingress-controller - Service is not ready: gitlab-managed-apps/ingress-nginx-ingress-controller Ingress资源与Kubernetes上的NGINX入口控制器 - Ingress resource vs NGINX ingress controller on Kubernetes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM