Skip to content

Commit bfd5750

Browse files
committed
add blog post for in-tree cloud providers going beta
1 parent e1b66b1 commit bfd5750

File tree

1 file changed

+217
-0
lines changed

1 file changed

+217
-0
lines changed
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
layout: blog
3+
title: "Kubernetes 1.29: Cloud Provider Integrations Are Now Separate Components"
4+
date: 2023-12-14T09:30:00-08:00
5+
slug: cloud-provider-integration-changes
6+
---
7+
8+
**Authors:** Michael McCune (Red Hat), Andrew Sy Kim (Google)
9+
10+
For Kubernetes v1.29, you need to use additional components to integrate your
11+
Kubernetes cluster with a cloud infrastructure provider. By default, Kubernetes
12+
v1.29 disallows components configured with legacy compiled-in cloud provider
13+
integrations.
14+
15+
In 2018, the [Kubernetes community agreed to form the Cloud Provider Special
16+
Interest Group (SIG)][oldblog], with a mission to externalize all cloud provider
17+
integrations and remove all the existing in-tree cloud provider integrations.
18+
In January 2019, the Kubernetes community approved the initial draft of
19+
[KEP-2395: Removing In-Tree Cloud Provider Code][kep2395]. This KEP defines a
20+
process by which we can remove cloud provider specific code from the core
21+
Kubernetes source tree. From the KEP:
22+
23+
> Motiviation [sic] behind this effort is to allow cloud providers to develop and
24+
> make releases independent from the core Kubernetes release cycle. The
25+
> de-coupling of cloud provider code allows for separation of concern between
26+
> "Kubernetes core" and the cloud providers within the ecosystem. In addition,
27+
> this ensures all cloud providers in the ecosystem are integrating with
28+
> Kubernetes in a consistent and extendable way.
29+
30+
After many years of development and collaboration across many contributors,
31+
the default behavior for legacy cloud provider integrations is changing.
32+
This means that users will need to confirm their Kubernetes configurations,
33+
and in some cases run external cloud controller managers. These changes are
34+
taking effect in Kubernetes version 1.29; read on to learn if you are affected
35+
and what changes you will need to make.
36+
37+
These updated default settings affect a large proportion of Kubernetes users,
38+
and **will require changes** for users who were previously using the in-tree
39+
provider integrations. The legacy integrations offered compatibility with
40+
Azure, AWS, GCE, OpenStack, and vSphere; however for AWS and OpenStack the
41+
compiled-in integrations were removed in Kubernetes versions 1.26 and 1.27,
42+
respectively.
43+
44+
## What has changed?
45+
46+
At the most basic level, two [feature gates][fg] are changing their default
47+
value from false to true. Those feature gates, `DisableCloudProviders` and
48+
`DisableKubeletCloudCredentialProviders`, control the way that the
49+
[kube-apiserver][kapi], [kube-controller-manager][kcm], and [kubelet][kubelet]
50+
invoke the cloud provider related code that is included in those components.
51+
When these feature gates are true (the default), the only recognized value for
52+
the `--cloud-provider` command line argument is `external`.
53+
54+
Let's see what the [official Kubernetes documentation][fg] says about these
55+
feature gates:
56+
57+
> `DisableCloudProviders`: Disables any functionality in `kube-apiserver`,
58+
> `kube-controller-manager` and `kubelet` related to the `--cloud-provider`
59+
> component flag.
60+
61+
> `DisableKubeletCloudCredentialProviders`: Disable the in-tree functionality
62+
> in kubelet to authenticate to a cloud provider container registry for image
63+
> pull credentials.
64+
65+
The next stage beyond beta will be full removal; for that release onwards, you
66+
won't be able to override those feature gates back to false.
67+
68+
## What do you need to do?
69+
70+
If you are upgrading from Kubernetes 1.28+ and are not on Azure, GCE, or
71+
vSphere then there are no changes you will need to make. If
72+
you **are** on Azure, GCE, or vSphere, or you are upgrading from a version
73+
older than 1.28, then read on.
74+
75+
Historically, Kubernetes has included code for a set of cloud providers that
76+
included AWS, Azure, GCE, OpenStack, and vSphere. Since the inception of
77+
[KEP-2395][kep2395] the community has been moving towards removal of that
78+
cloud provider code. The OpenStack provider code was removed in version 1.26,
79+
and the AWS provider code was removed in version 1.27. This means that users
80+
who are upgrading from one of the affected cloud providers and versions will
81+
need to modify their deployments.
82+
83+
### Upgrading on Azure, GCE, or vSphere
84+
85+
There are two options for upgrading in this configuration: migrate to external
86+
cloud controller managers, or continue using the in-tree provider code.
87+
Although migrating to external cloud controller managers is recommended,
88+
there are scenarios where continuing with the current behavior is desired.
89+
Please choose the best option for your needs.
90+
91+
#### Migrate to external cloud controller managers
92+
93+
Migrating to use external cloud controller managers is the recommended upgrade
94+
path, when possible in your situation. To do this you will need to
95+
enable the `--cloud-provider=external` command line flag for the
96+
`kube-apiserver`, `kube-controller-manager`, and `kubelet` components. In
97+
addition you will need to deploy a cloud controller manager for your provider.
98+
99+
Installing and running cloud controller managers is a larger topic than this
100+
post can address; if you would like more information on this process please
101+
read the documentation for [Cloud Controller Manager Administration][ccmadmin]
102+
and [Migrate Replicated Control Plane To Use Cloud Controller Manager][ccmha].
103+
See [below](#cloud-provider-integrations) for links to specific cloud provider
104+
implementations.
105+
106+
#### Continue using in-tree provider code
107+
108+
If you wish to continue using Kubernetes with the in-tree cloud provider code,
109+
you will need to modify the command line parameters for `kube-apiserver`,
110+
`kube-controller-manager`, and `kubelet` to disable the feature gates for
111+
`DisableCloudProviders` and `DisableKubeletCloudCredentialProviders`. To do
112+
this, add the following command line flag to the arguments for the previously
113+
listed commands:
114+
115+
```
116+
--feature-gates=DisableCloudProviders=false,DisableKubeletCloudCredentialProviders=false
117+
```
118+
119+
_Please note that if you have other feature gate modifications on the command
120+
line, they will need to include these 2 feature gates._
121+
122+
**Note**: These feature gates will be locked to `true` in an upcoming
123+
release. Setting these feature gates to `false` should be used as a last
124+
resort. It is highly recommended to migrate to an external cloud controller
125+
manager as the in-tree providers are planned for removal as early as Kubernetes
126+
version 1.31.
127+
128+
### Upgrading on other providers
129+
130+
For providers other than Azure, GCE, or vSphere, good news, the external cloud
131+
controller manager should already be in use. You can confirm this by inspecting
132+
the `--cloud-provider` flag for the kubelets in your cluster, they will have
133+
the value `external` if using external providers. The code for AWS and OpenStack
134+
providers was removed from Kubernetes before version 1.27 was released.
135+
Other providers beyond the AWS, Azure, GCE, OpenStack, and vSphere were never
136+
included in Kubernetes and as such they began their life as external cloud
137+
controller managers.
138+
139+
### Upgrading from older Kubernetes versions
140+
141+
If you are upgrading from a Kubernetes release older than 1.26, and you are on
142+
AWS, Azure, GCE, OpenStack, or vSphere then you will need to enable the
143+
`--cloud-provider=external` flag, and follow the advice for installing and
144+
running a cloud controller manager for your provider.
145+
146+
Please read the documentation for
147+
[Cloud Controller Manager Administration][ccmadmin] and
148+
[Migrate Replicated Control Plane To Use Cloud Controller Manager][ccmha]. See
149+
below for links to specific cloud provider implementations.
150+
151+
## Where to find a cloud controller manager?
152+
153+
At its core, this announcement is about the cloud provider integrations that
154+
were previously included in Kubernetes. As these components move out of the
155+
core Kubernetes code and into their own repositories, it is important to note
156+
a few things:
157+
158+
First, SIG Cloud Provider offers a reference framework for developers who
159+
wish to create cloud controller managers for any provider. See the
160+
[cloud-provider repository][cloud-provider] for more information about how
161+
these controllers work and how to get started creating your own.
162+
163+
Second, there are many cloud controller managers available for Kubernetes.
164+
This post is addressing the provider integrations that have been historically
165+
included with Kubernetes but are now in the process of being removed. If you
166+
need a cloud controller manager for your provider and do not see it listed here,
167+
please reach out to the cloud provider you are integrating with or the
168+
[Kubernetes SIG Cloud Provider community][sig] for help and advice. It is
169+
worth noting that while most cloud controller managers are open source today,
170+
this may not always be the case. Users should always contact their cloud
171+
provider to learn if there are preferred solutions to utilize on their
172+
infrastructure.
173+
174+
### Cloud provider integrations provided by the Kubernetes project {#cloud-provider-integrations}
175+
176+
* AWS - https://github.com/kubernetes/cloud-provider-aws
177+
* Azure - https://github.com/kubernetes-sigs/cloud-provider-azure
178+
* GCE - https://github.com/kubernetes/cloud-provider-gcp
179+
* OpenStack - https://github.com/kubernetes/cloud-provider-openstack
180+
* vSphere - https://github.com/kubernetes/cloud-provider-vsphere
181+
182+
If you are looking for an automated approach to installing cloud controller
183+
managers in your clusters, the [kOps][kops] project provides a convenient
184+
solution for managing production-ready clusters.
185+
186+
## Want to learn more?
187+
188+
Cloud providers and cloud controller managers serve a core function in
189+
Kubernetes. Cloud providers are often the substrate upon which Kubernetes is
190+
operated, and the cloud controller managers supply the essential lifeline
191+
between Kubernetes clusters and their physical infrastructure.
192+
193+
This post covers one aspect of how the Kubernetes community interacts with
194+
the world of cloud infrastructure providers. If you are curious about this
195+
topic and want to learn more, the Cloud Provider Special Interest Group (SIG)
196+
is the place to go. SIG Cloud Provider hosts bi-weekly meetings to discuss all
197+
manner of topics related to cloud providers and cloud controller managers in
198+
Kubernetes.
199+
200+
### SIG Cloud Provider
201+
202+
* Regular SIG Meeting: [Wednesdays at 9:00 PT (Pacific Time)](https://zoom.us/j/508079177?pwd=ZmEvMksxdTFTc0N1eXFLRm91QUlyUT09) (biweekly). [Convert to your timezone](http://www.thetimezoneconverter.com/?t=9:00&tz=PT%20%28Pacific%20Time%29).
203+
* [Kubernetes slack][kslack] channel `#sig-cloud-provider`
204+
* [SIG Community page][sig]
205+
206+
[kep2395]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cloud-provider/2395-removing-in-tree-cloud-providers
207+
[fg]: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
208+
[kubelet]: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/
209+
[kcm]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/
210+
[kapi]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
211+
[ccmadmin]: https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/
212+
[ccmha]: https://kubernetes.io/docs/tasks/administer-cluster/controller-manager-leader-migration/
213+
[kslack]: https://kubernetes.slack.com
214+
[sig]: https://github.com/kubernetes/community/tree/master/sig-cloud-provider
215+
[cloud-provider]: https://github.com/kubernetes/cloud-provider
216+
[oldblog]: https://kubernetes.io/blog/2019/04/17/the-future-of-cloud-providers-in-kubernetes/
217+
[kops]: https://github.com/kubernetes/kops

0 commit comments

Comments
 (0)