nginx 入口没有控制器服务
nginx ingress no controller service
大家好,我需要一些帮助来解决问题:
我正在使用 rancher 提供给我的 kubernetes 集群(所以我没有配置它)
但它有一个 nginx 入口控制器:
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
当我在观看视频教程时 ([ Kube 59.1 ] Nginx Ingress in Kubernetes Revisited) 我注意到当他像我一样在入口命名空间中显示所有默认 backen svc 时,他也有一个“ ingress-controller svc of type load balancer”,我不知道,那么我该如何纠正呢?
谢谢你的帮助。
Nginx Ingress in Kubernetes Revisited 3:25 --> he sais that nginx-ingress-controller
of type LoadBalancer
goes from 。这意味着他 运行 本地集群,而不是云端。您可以使用 kubeadm
安装相同的
MetalLB 提供 LoadBalancer 服务:
https://metallb.universe.tf/
Kubernetes does not offer an implementation of network load-balancers
(Services of type LoadBalancer) for bare metal clusters. The
implementations of Network LB that Kubernetes does ship with are all
glue code that calls out to various IaaS platforms (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.
Bare metal cluster operators are left with two lesser tools to bring
user traffic into their clusters, “NodePort” and “externalIPs”
services. Both of these options have significant downsides for
production use, which makes bare metal clusters second class citizens
in the Kubernetes ecosystem.
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.
所以我设法让它工作,我的 rancher 上的 nginx 是从 rancher 应用程序目录部署的,并且“部署服务”字段设置为 false,所以我升级它并将该字段设置为是的,它为我部署了负载平衡服务,所以现在它工作正常。
谢谢
大家好,我需要一些帮助来解决问题: 我正在使用 rancher 提供给我的 kubernetes 集群(所以我没有配置它)
但它有一个 nginx 入口控制器:
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
当我在观看视频教程时 ([ Kube 59.1 ] Nginx Ingress in Kubernetes Revisited) 我注意到当他像我一样在入口命名空间中显示所有默认 backen svc 时,他也有一个“ ingress-controller svc of type load balancer”,我不知道,那么我该如何纠正呢? 谢谢你的帮助。
Nginx Ingress in Kubernetes Revisited 3:25 --> he sais that nginx-ingress-controller
of type LoadBalancer
goes from
MetalLB 提供 LoadBalancer 服务: https://metallb.universe.tf/
Kubernetes does not offer an implementation of network load-balancers (Services of type LoadBalancer) for bare metal clusters. The implementations of Network LB that Kubernetes does ship with are all glue code that calls out to various IaaS platforms (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.
Bare metal cluster operators are left with two lesser tools to bring user traffic into their clusters, “NodePort” and “externalIPs” services. Both of these options have significant downsides for production use, which makes bare metal clusters second class citizens in the Kubernetes ecosystem.
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.
所以我设法让它工作,我的 rancher 上的 nginx 是从 rancher 应用程序目录部署的,并且“部署服务”字段设置为 false,所以我升级它并将该字段设置为是的,它为我部署了负载平衡服务,所以现在它工作正常。 谢谢