[英]Kubernetes cloud provider
I'm new to Kubernetes and their is a concept I'm not sure to fully understand: Cloud Providers.我是 Kubernetes 的新手,他们是一个我不确定完全理解的概念:云提供商。
I manage to have running applications with L7 ingresses and ClusterIP services but everytime I try to have a L4 LoadBalancer, the LoadBalancer is stuck in pending state.我设法运行具有 L7 入口和 ClusterIP 服务的应用程序,但每次我尝试使用 L4 LoadBalancer 时,LoadBalancer 都卡在挂起状态。 According to https://github.com/rancher/rancher/issues/14424 this is because I doesn't have any CloudProvider.根据https://github.com/rancher/rancher/issues/14424,这是因为我没有任何 CloudProvider。
But what is exactly the purpose of a CloudProvider?但是 CloudProvider 的目的究竟是什么? Isn't it to run Kubernetes nodes, pods, ... on the cloud?不是要在云上运行 Kubernetes 节点、pods 吗? If yes, why should I bother getting a CloudProvider if my applications are pods are already on the cloud and accessible from the outside thanks to my configuration.如果是的话,如果我的应用程序是 pods 并且由于我的配置已经在云上并且可以从外部访问,我为什么要费心去获取 CloudProvider。
So my following questions are:所以我的以下问题是:
Thanks for any clarification/recommandation on this subject.感谢您对此主题的任何澄清/建议。 - ——
An external cloud provider is a kubernetes controller that runs cloud provider-specific loops required for the functioning of kubernetes.外部云提供商是一个 kubernetes 控制器,它运行 kubernetes 运行所需的特定于云提供商的循环。 These loops were originally a part of the kube-controller-manager, but they were tightly coupling the kube-controller-manager to cloud-provider specific code.这些循环最初是 kube-controller-manager 的一部分,但它们将 kube-controller-manager 与云提供商特定代码紧密耦合。 In order to free the kubernetes project of this dependency, the cloud-controller-manager was introduced.为了释放kubernetes项目的这种依赖,引入了cloud-controller-manager。
This brings us to the topic of Kubernetes Cloud Controller Manager这将我们带到了Kubernetes Cloud Controller Manager的主题
Kubernetes v1.6 introduced a new binary called cloud-controller-manager. Kubernetes v1.6 引入了一个名为 cloud-controller-manager 的新二进制文件。 cloud-controller-manager is a daemon that embeds cloud-specific control loops. cloud-controller-manager 是一个嵌入云特定控制循环的守护进程。 These cloud-specific control loops were originally in the kube-controller-manager.这些特定于云的控制循环最初位于 kube-controller-manager 中。 Since cloud providers develop and release at a different pace compared to the Kubernetes project, abstracting the provider-specific code to the cloud-controller-manager binary allows cloud vendors to evolve independently from the core Kubernetes code.由于与 Kubernetes 项目相比,云供应商以不同的速度开发和发布,将供应商特定代码抽象为云控制器管理器二进制文件允许云供应商独立于核心 Kubernetes 代码发展。
Regarding the LoadBalancer part:关于 LoadBalancer 部分:
You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster.您需要有一个 Kubernetes 集群,并且必须配置 kubectl 命令行工具才能与您的集群通信。
An API object that manages external access to the services in a cluster, typically HTTP.管理对集群中服务的外部访问的 API 对象,通常是 HTTP。 Ingress can provide load balancing, SSL termination and name-based virtual hosting. Ingress 可以提供负载平衡、SSL 终止和基于名称的虚拟主机。
If you want to get a better idea of this concept than check out this SO thread .如果你想更好地了解这个概念,而不是查看这个 SO 线程。
And lastly regarding the custom Cloud Provider .最后关于自定义Cloud Provider 。 It is possible to enable a different cloud provider for RKE:可以为 RKE 启用不同的云提供商:
If you want to enable a different cloud provider, RKE allows for custom cloud provider options.如果您想启用不同的云提供商,RKE 允许自定义云提供商选项。 A name must be provided and the custom Cloud Provider options can be passed in as a multiline string in
customCloudProvider
.必须提供名称,并且自定义云提供商选项可以作为customCloudProvider
的多行字符串customCloudProvider
。
I hope it helps.我希望它有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.