Skip to content

Commit dab6bae

Browse files
authored
Merge pull request #44010 from elmiko/blog-post-for-kep-2395-beta-status
add blog post for in-tree cloud provider removal going beta
2 parents efe87b4 + eeba8cc commit dab6bae

File tree

1 file changed

+218
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)