You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since cloud providers develop and release at a different pace compared to the Kubernetes project, abstracting the provider-specific code to the `{{< glossary_tooltip text="cloud-controller-manager" term_id="cloud-controller-manager" >}}` binary allows cloud vendors to evolve independently from the core Kubernetes code.
21
+
Since cloud providers develop and release at a different pace compared to the
22
+
Kubernetes project, abstracting the provider-specific code to the
The `cloud-controller-manager` can be linked to any cloud provider that satisfies [cloudprovider.Interface](https://github.com/kubernetes/cloud-provider/blob/master/cloud.go). For backwards compatibility, the [cloud-controller-manager](https://github.com/kubernetes/kubernetes/tree/master/cmd/cloud-controller-manager) provided in the core Kubernetes project uses the same cloud libraries as `kube-controller-manager`. Cloud providers already supported in Kubernetes core are expected to use the in-tree cloud-controller-manager to transition out of Kubernetes core.
31
+
The `cloud-controller-manager` can be linked to any cloud provider that satisfies
@@ -42,11 +51,16 @@ The `cloud-controller-manager` can be linked to any cloud provider that satisfie
42
51
43
52
### Requirements
44
53
45
-
Every cloud has their own set of requirements for running their own cloud provider integration, it should not be too different from the requirements when running `kube-controller-manager`. As a general rule of thumb you'll need:
54
+
Every cloud has their own set of requirements for running their own cloud provider
55
+
integration, it should not be too different from the requirements when running
56
+
`kube-controller-manager`. As a general rule of thumb you'll need:
46
57
47
-
* cloud authentication/authorization: your cloud may require a token or IAM rules to allow access to their APIs
48
-
* kubernetes authentication/authorization: cloud-controller-manager may need RBAC rules set to speak to the kubernetes apiserver
49
-
* high availability: like kube-controller-manager, you may want a high available setup for cloud controller manager using leader election (on by default).
58
+
* cloud authentication/authorization: your cloud may require a token or IAM rules
59
+
to allow access to their APIs
60
+
* kubernetes authentication/authorization: cloud-controller-manager may need RBAC
61
+
rules set to speak to the kubernetes apiserver
62
+
* high availability: like kube-controller-manager, you may want a high available
63
+
setup for cloud controller manager using leader election (on by default).
50
64
-->
51
65
## 管理
52
66
@@ -69,21 +83,33 @@ Successfully running cloud-controller-manager requires some changes to your clus
69
83
你需要对集群配置做适当的修改以成功地运行云管理控制器:
70
84
71
85
<!--
72
-
* `kube-apiserver` and `kube-controller-manager` MUST NOT specify the `--cloud-provider` flag. This ensures that it does not run any cloud specific loops that would be run by cloud controller manager. In the future, this flag will be deprecated and removed.
73
-
* `kubelet` must run with `--cloud-provider=external`. This is to ensure that the kubelet is aware that it must be initialized by the cloud controller manager before it is scheduled any work.
86
+
* `kube-apiserver` and `kube-controller-manager` MUST NOT specify the `--cloud-provider`
87
+
flag. This ensures that it does not run any cloud specific loops that would be run by
88
+
cloud controller manager. In the future, this flag will be deprecated and removed.
89
+
* `kubelet` must run with `--cloud-provider=external`. This is to ensure that the
90
+
kubelet is aware that it must be initialized by the cloud controller manager
Keep in mind that setting up your cluster to use cloud controller manager will change your cluster behaviour in a few ways:
99
+
Keep in mind that setting up your cluster to use cloud controller manager will
100
+
change your cluster behaviour in a few ways:
82
101
-->
83
102
请记住,设置集群使用云管理控制器将用多种方式更改集群行为:
84
103
85
104
<!--
86
-
* kubelets specifying `--cloud-provider=external` will add a taint `node.cloudprovider.kubernetes.io/uninitialized` with an effect `NoSchedule` during initialization. This marks the node as needing a second initialization from an external controller before it can be scheduled work. Note that in the event that cloud controller manager is not available, new nodes in the cluster will be left unschedulable. The taint is important since the scheduler may require cloud specific information about nodes such as their region or type (high cpu, gpu, high memory, spot instance, etc).
105
+
* kubelets specifying `--cloud-provider=external` will add a taint
106
+
`node.cloudprovider.kubernetes.io/uninitialized` with an effect `NoSchedule`
107
+
during initialization. This marks the node as needing a second initialization
108
+
from an external controller before it can be scheduled work. Note that in the
109
+
event that cloud controller manager is not available, new nodes in the cluster
110
+
will be left unschedulable. The taint is important since the scheduler may
111
+
require cloud specific information about nodes such as their region or type
@@ -93,7 +119,12 @@ Keep in mind that setting up your cluster to use cloud controller manager will c
93
119
(高端 CPU、GPU 支持、内存较大、临时实例等)。
94
120
95
121
<!--
96
-
* cloud information about nodes in the cluster will no longer be retrieved using local metadata, but instead all API calls to retrieve node information will go through cloud controller manager. This may mean you can restrict access to your cloud API on the kubelets for better security. For larger clusters you may want to consider if cloud controller manager will hit rate limits since it is now responsible for almost all API calls to your cloud from within the cluster.
122
+
* cloud information about nodes in the cluster will no longer be retrieved using
123
+
local metadata, but instead all API calls to retrieve node information will go
124
+
through cloud controller manager. This may mean you can restrict access to your
125
+
cloud API on the kubelets for better security. For larger clusters you may want
126
+
to consider if cloud controller manager will hit rate limits since it is now
127
+
responsible for almost all API calls to your cloud from within the cluster.
97
128
-->
98
129
* 集群中节点的云服务信息将不再能够从本地元数据中获取,取而代之的是所有获取节点信息的
99
130
API 调用都将通过云管理控制器。这意味着你可以通过限制到 kubelet 云服务 API 的访问来提升安全性。
@@ -103,8 +134,10 @@ Keep in mind that setting up your cluster to use cloud controller manager will c
103
134
<!--
104
135
Cloud controller manager can implement:
105
136
106
-
* node controller - responsible for updating kubernetes nodes using cloud APIs and deleting kubernetes nodes that were deleted on your cloud.
107
-
* service controller - responsible for loadbalancers on your cloud against services of type LoadBalancer.
137
+
* node controller - responsible for updating kubernetes nodes using cloud APIs
138
+
and deleting kubernetes nodes that were deleted on your cloud.
139
+
* service controller - responsible for loadbalancers on your cloud against
140
+
services of type LoadBalancer.
108
141
* route controller - responsible for setting up network routes on your cloud
109
142
* any other features you would like to implement if you are running an out-of-tree provider.
110
143
-->
@@ -118,9 +151,12 @@ Cloud controller manager can implement:
118
151
<!--
119
152
## Examples
120
153
121
-
If you are using a cloud that is currently supported in Kubernetes core and would like to adopt cloud controller manager, see the [cloud controller manager in kubernetes core](https://github.com/kubernetes/kubernetes/tree/master/cmd/cloud-controller-manager).
154
+
If you are using a cloud that is currently supported in Kubernetes core and would
155
+
like to adopt cloud controller manager, see the
156
+
[cloud controller manager in kubernetes core](https://github.com/kubernetes/kubernetes/tree/master/cmd/cloud-controller-manager).
122
157
123
-
For cloud controller managers not in Kubernetes core, you can find the respective projects in repos maintained by cloud vendors or sig leads.
158
+
For cloud controller managers not in Kubernetes core, you can find the respective
159
+
projects in repos maintained by cloud vendors or sig leads.
124
160
-->
125
161
## 示例
126
162
@@ -135,7 +171,8 @@ For cloud controller managers not in Kubernetes core, you can find the respectiv
For providers already in Kubernetes core, you can run the in-tree cloud controller manager as a Daemonset in your cluster, use the following as a guideline:
174
+
For providers already in Kubernetes core, you can run the in-tree cloud controller
175
+
manager as a Daemonset in your cluster, use the following as a guideline:
@@ -144,7 +181,9 @@ For providers already in Kubernetes core, you can run the in-tree cloud controll
144
181
<!--
145
182
## Limitations
146
183
147
-
Running cloud controller manager comes with a few possible limitations. Although these limitations are being addressed in upcoming releases, it's important that you are aware of these limitations for production workloads.
184
+
Running cloud controller manager comes with a few possible limitations. Although
185
+
these limitations are being addressed in upcoming releases, it's important that
186
+
you are aware of these limitations for production workloads.
148
187
-->
149
188
## 限制
150
189
@@ -153,25 +192,44 @@ Running cloud controller manager comes with a few possible limitations. Although
153
192
<!--
154
193
### Support for Volumes
155
194
156
-
Cloud controller manager does not implement any of the volume controllers found in `kube-controller-manager` as the volume integrations also require coordination with kubelets. As we evolve CSI (container storage interface) and add stronger support for flex volume plugins, necessary support will be added to cloud controller manager so that clouds can fully integrate with volumes. Learn more about out-of-tree CSI volume plugins [here](https://github.com/kubernetes/features/issues/178).
195
+
Cloud controller manager does not implement any of the volume controllers found
196
+
in `kube-controller-manager` as the volume integrations also require coordination
197
+
with kubelets. As we evolve CSI (container storage interface) and add stronger
198
+
support for flex volume plugins, necessary support will be added to cloud
199
+
controller manager so that clouds can fully integrate with volumes. Learn more
200
+
about out-of-tree CSI volume plugins [here](https://github.com/kubernetes/features/issues/178).
In the previous architecture for cloud providers, we relied on kubelets using a local metadata service to retrieve node information about itself. With this new architecture, we now fully rely on the cloud controller managers to retrieve information for all nodes. For very larger clusters, you should consider possible bottle necks such as resource requirements and API rate limiting.
214
+
The cloud-controller-manager queries your cloud provider's APIs to retrieve
215
+
information for all nodes. For very large clusters, consider possible
216
+
bottlenecks such as resource requirements and API rate limiting.
166
217
-->
167
218
### 可扩展性
168
219
169
-
在以前为云服务提供商提供的架构中,我们依赖 kubelet 的本地元数据服务来获取关于它本身的节点信息。通过这个新的架构,现在我们完全依赖云管理控制器来获取所有节点的信息。对于非常大的集群,你需要考虑可能的瓶颈,例如资源需求和 API 速率限制。
220
+
通过云管理控制器查询你的云提供商的 API 以检索所有节点的信息。
221
+
对于非常大的集群,请考虑可能的瓶颈,例如资源需求和 API 速率限制。
170
222
171
223
<!--
172
224
### Chicken and Egg
173
225
174
-
The goal of the cloud controller manager project is to decouple development of cloud features from the core Kubernetes project. Unfortunately, many aspects of the Kubernetes project has assumptions that cloud provider features are tightly integrated into the project. As a result, adopting this new architecture can create several situations where a request is being made for information from a cloud provider, but the cloud controller manager may not be able to return that information without the original request being complete.
226
+
The goal of the cloud controller manager project is to decouple development
227
+
of cloud features from the core Kubernetes project. Unfortunately, many aspects
228
+
of the Kubernetes project has assumptions that cloud provider features are tightly
229
+
integrated into the project. As a result, adopting this new architecture can create
230
+
several situations where a request is being made for information from a cloud provider,
231
+
but the cloud controller manager may not be able to return that information without
232
+
the original request being complete.
175
233
-->
176
234
### 鸡和蛋的问题
177
235
@@ -181,7 +239,12 @@ The goal of the cloud controller manager project is to decouple development of c
181
239
在该请求没有完成的情况下云管理控制器不能返回那些信息。
182
240
183
241
<!--
184
-
A good example of this is the TLS bootstrapping feature in the Kubelet. Currently, TLS bootstrapping assumes that the Kubelet has the ability to ask the cloud provider (or a local metadata service) for all its address types (private, public, etc) but cloud controller manager cannot set a node's address types without being initialized in the first place which requires that the kubelet has TLS certificates to communicate with the apiserver.
242
+
A good example of this is the TLS bootstrapping feature in the Kubelet.
243
+
Currently, TLS bootstrapping assumes that the Kubelet has the ability to ask the cloud provider
244
+
(or a local metadata service) for all its address types (private, public, etc)
245
+
but cloud controller manager cannot set a node's address types without being
246
+
initialized in the first place which requires that the kubelet has TLS certificates
247
+
to communicate with the apiserver.
185
248
186
249
As this initiative evolves, changes will be made to address these issues in upcoming releases.
187
250
-->
@@ -195,7 +258,8 @@ TLS 证书以和 API 服务器通信。
195
258
## {{% heading "whatsnext" %}}
196
259
197
260
<!--
198
-
To build and develop your own cloud controller manager, read the [Developing Cloud Controller Manager](/docs/tasks/administer-cluster/developing-cloud-controller-manager.md) doc.
261
+
To build and develop your own cloud controller manager, read
262
+
the [Developing Cloud Controller Manager](/docs/tasks/administer-cluster/developing-cloud-controller-manager.md) doc.
0 commit comments