简体   繁体   English

如何创建应用程序负载均衡器以公开 kubernetes 集群

[英]How to create application load balancer to expose kubernetes cluster

As i went through few resources on the internet i managed to create classic load balancer by setting the flags in my kube.apiserver, kubelet.service, kubecontroller manager and created a cluster and deployed a sample nginx file and it has exposed the application but i see that it has created classic load balancer and what i wanted is an application load balancer to be created am i supposed to do anymore changes?当我浏览互联网上的少量资源时,我设法通过在我的 kube.apiserver、kubelet.service、kubecontroller 管理器中设置标志来创建经典负载均衡器,并创建了一个集群并部署了一个示例 nginx 文件,它已经暴露了应用程序,但我看到它创建了经典的负载均衡器,我想要的是创建一个应用程序负载均衡器我应该做更多的改变吗? and also when i deploy a kibana helm chart i do get an load balancer external ip but when i access it i don't see any page.而且当我部署 kibana helm chart 时,我确实得到了一个external ip但是当我访问它时,我看不到任何页面。

NAME                                        READY   STATUS    RESTARTS   AGE
pod/elasticsearch-client-5df74c974d-dp6xw   1/1     Running   0          5h52m
pod/elasticsearch-data-0                    1/1     Running   0          5h52m
pod/elasticsearch-master-0                  1/1     Running   0          5h52m
pod/fluent-bit-h9kgm                        1/1     Running   0          5h52m
pod/kibana-b9d8dc6d5-cbj8j                  1/1     Running   0          7s

NAME                              TYPE           CLUSTER-IP      EXTERNAL-IP                                                              PORT(S)         AGE
service/elasticsearch-client      ClusterIP      10.100.13.46    <none>                                                                   9200/TCP        5h52m
service/elasticsearch-discovery   ClusterIP      None            <none>                                                                   9300/TCP        5h52m
service/kibana                    LoadBalancer   10.100.14.245   adaec083b81644ecbb87d4d2ba0dc070-693460825.us-east-1.elb.amazonaws.com   443:32734/TCP   7s

NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/fluent-bit   1         1         1       1            1           <none>          5h52m

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/elasticsearch-client   1/1     1            1           5h52m
deployment.apps/kibana                 1/1     1            1           7s

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/elasticsearch-client-5df74c974d   1         1         1       5h52m
replicaset.apps/kibana-b9d8dc6d5                  1         1         1       7s

NAME                                    READY   AGE
statefulset.apps/elasticsearch-data     1/1     5h52m
statefulset.apps/elasticsearch-master   1/1     5h52m

As you can see above i'm able to get a LoadBalancer <externalIP> but i don't see anything when i open that link.正如您在上面看到的,我可以获得一个LoadBalancer <externalIP>但是当我打开该链接时我什么也看不到。

And also my requirement was to deploy an Application Load Balancer and after i would deploy an Ingress helm chart and in the ingress resources i would specify the paths and ports.而且我的要求是部署一个应用程序负载均衡器,在我部署一个 Ingress helm 图表之后,我将在入口资源中指定路径和端口。

From the docs as of now only ELB and NLB is supported loadbalancer type for AWS.从目前的文档来看,AWS 仅支持 ELB 和 NLB 类型的负载均衡器。

Edit:编辑:

Using LoadBalancer type service you can have single NLB/ELB for the nginx ingress controller and use it for as many ingress resource as you want to route traffic to backend cluster IP type service.使用LoadBalancer类型的服务,您可以为 nginx 入口 controller 使用单个 NLB/ELB,并将其用于您想要将流量路由到后端集群 ZA12A3079E14CED46E69BA52B8A 的尽可能多的入口资源。

But if you wan to use ALB you have to manually create it (following AWS docs) and configure it to forward traffic to your Kubernetes nodes NodePort where nginx ingress controller is running.但是,如果您想使用 ALB,则必须手动创建它(按照 AWS 文档)并将其配置为将流量转发到 Kubernetes 节点NodePort ,其中 nginx 入口 Z594C103F2C6E034C3D8AB059C0 正在运行。 Creating a LoadBalancer type service will not work in this case.在这种情况下,创建LoadBalancer类型的服务将不起作用。 You will have to create a NodePort service for the nginx ingress controller.您必须为 nginx 入口 controller 创建NodePort服务。

暂无
暂无

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

相关问题 如何在kubernetes的aws上创建应用程序负载均衡器 - How to create application load balancer on aws for kubernetes 使用负载均衡器在 AWS EKS 上公开 Hazelcast 集群 - Expose a Hazelcast cluster on AWS EKS with a load balancer 如何在 pprivate EKS 集群中公开我的应用程序外部集群或 vpc 我的内部负载均衡器 - How to expose my app outside cluster or vpc my internal load balancer in pprivate EKS cluster 为Kubernetes HA集群选择AWS负载均衡器 - Choosing of AWS Load Balancer for Kubernetes HA cluster 如何通过 Ingress AWS 应用程序负载均衡器公开 Linkerd Viz Dashboard - How to expose Linkerd Viz Dashboard via Ingress AWS Application Load balancer 有没有办法将应用程序负载均衡器从我的前端集群连接到由 AWS 中的后端集群创建的经典负载均衡器 - Is there a way to connect a Application Load balancer from my frontend cluster to a Classic Load balancer created by backend cluster in AWS 在弹性 beanstalk 和 kubernetes 之间分布的应用程序负载均衡器 - Application load balancer distributing between elastic beanstalk and kubernetes Cloudformation 为 Application Load Balancer 自动创建证书 - Cloudformation auto create certficate for Application Load Balancer 带有 Istio 网关和 AWS HTTPS 应用程序负载均衡器的 AWS K3S Kubernetes 集群上的 Keycloak 服务器管理控制台阻止了混合内容响应 - Keycloak Server Admin Console Blocked Mixed Content Response on AWS K3S Kubernetes Cluster with Istio Gateway and AWS HTTPS Application Load Balancer 使用高可用性Kubernetes集群为kube-api服务器创建负载均衡器 - Creating Load Balancer for kube-api server with High Availability Kubernetes Cluster
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM