Skip to content

Commit 501098a

Browse files
authored
Merge pull request #46342 from andrewsykim/cloud-provider-migration-blog
add blog about cloud provider migration
2 parents 0756576 + b515b2d commit 501098a

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
layout: blog
3+
title: 'Completing the largest migration in Kubernetes history'
4+
date: 2024-05-20
5+
slug: completing-cloud-provider-migration
6+
author: >
7+
Andrew Sy Kim (Google),
8+
Michelle Au (Google),
9+
Michael McCune (Red Hat)
10+
---
11+
12+
Since as early as Kubernetes v1.7, the Kubernetes project has pursued the ambitious goal of removing built-in cloud provider integrations.
13+
While these integrations were instrumental in Kubernetes' early development and growth, their removal was driven by two key factors:
14+
the growing complexity of maintaining native support for every cloud provider across millions of lines of Go code, and the desire to establish
15+
Kubernetes as a truly vendor-neutral platform.
16+
17+
After many releases, we're thrilled to announce that all cloud provider integrations have been successfully migrated from the core Kubernetes repository to external plugins.
18+
This migration was a complex and long-running effort due to the numerous impacted components and the critical code paths that relied on the built-in integrations for the
19+
five initial cloud providers: Google Cloud, AWS, Azure, OpenStack, and vSphere. To successfully complete this migration, we had to build four new subsystems from the ground up:
20+
21+
1. [Cloud Controller Manager](https://kubernetes.io/docs/concepts/architecture/cloud-controller/)
22+
2. [API Server Network Proxy](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1281-network-proxy)
23+
3. [Kubelet Credential Provider Plugins](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2133-kubelet-credential-providers)
24+
4. [CSI In-tree Storage migration plugins](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/625-csi-migration/README.md)
25+
26+
Each subsystem was critical to achieve full feature parity with built-in capabilities and required several releases to bring each subsystem to GA-level maturity with a safe and
27+
reliable migration path. More on each subsystem below.
28+
29+
### Cloud Controller Manager
30+
31+
The cloud controller manager was the first external component introduced in this effort, replacing functionality within the kube-controller-manager and kubelet that directly interacted with cloud APIs.
32+
This essential component is responsible for initializing nodes by applying metadata labels that indicate the cloud region and zone a Node is running on, as well as IP addresses that are only known to the cloud provider.
33+
Additionally, it runs the service controller, which is responsible for provisioning cloud load balancers for Services of type LoadBalancer.
34+
35+
![Kubernetes components](/images/docs/components-of-kubernetes.svg)
36+
37+
Learn more about Cloud Controller Manager [here](/docs/concepts/architecture/cloud-controller).
38+
39+
### API Server Network Proxy
40+
41+
The API Server Network Proxy project, initiated in 2018 in collaboration with SIG API Machinery, aimed to replace the SSH tunneler functionality within the kube-apiserver.
42+
This tunneler had been used to securely proxy traffic between the Kubernetes control plane and nodes, but it heavily relied on provider-specific implementation details embedded in the kube-apiserver to establish these SSH tunnels.
43+
44+
Now, the API Server Network Proxy is a GA-level extension point within the kube-apiserver. It offers a generic proxying mechanism that can route traffic from the API server to nodes through a secure proxy,
45+
eliminating the need for the API server to have any knowledge of the specific cloud provider it is running on. This project also introduced the Konnectivity project, which has seen growing adoption in production environments.
46+
47+
Learn more about the API Server Network Proxy [here](https://github.com/kubernetes-sigs/apiserver-network-proxy).
48+
49+
### Kubelet Credential Provider
50+
51+
The Kubelet credential provider plugin was developed to replace the kubelet's built-in functionality for dynamically fetching credentials for image registries hosted on Google Cloud, AWS, or Azure.
52+
This capability was convenient as it allowed the kubelet to seamlessly retrieve short-lived tokens for pulling images from GCR, ECR, or ACR. However, like other areas of the project,
53+
this required the kubelet to have specific knowledge of different cloud environments and APIs.
54+
55+
Introduced in 2019, the credential provider plugin offers a generic extension point for the kubelet to execute plugin binaries that dynamically provide credentials for images hosted on various clouds.
56+
This extensibility expands the kubelet's capabilities to fetch short-lived tokens beyond the initial three cloud providers.
57+
58+
Learn more about Kubelet Credential Provider [here](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/).
59+
60+
### CSI In-tree Storage Migration Plugins
61+
62+
The Container Storage Interface (CSI) is a control plane standard for managing block and file storage systems in Kubernetes and other container orchestrators that went GA in 1.13.
63+
It was designed to replace the in-tree volume plugins built directly into Kubernetes with drivers that can run as Pods within the Kubernetes cluster.
64+
These drivers communicate with kube-controller-manager storage controllers via the Kubernetes API, and with kubelet through a local gRPC endpoint.
65+
Now there are over 100 CSI drivers available across all major cloud and storage vendors, making stateful workloads in Kubernetes a reality.
66+
67+
However, a major challenge remained on how to handle all the existing users of in-tree volume APIs. To retain API backwards compatibility,
68+
we built an API translation layer into our controllers that will convert the in-tree volume API into the equivalent CSI API. This allowed us to redirect all storage operations to the CSI driver,
69+
paving the way for us to remove the code for the built-in volume plugins without removing the API.
70+
71+
Learn more about In-tree Storage migration in [this blog post](https://kubernetes.io/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/).
72+
73+
## What’s Next?
74+
75+
This migration has been the primary focus for SIG Cloud Provider over the past few years. With this significant milestone achieved, we will be shifting our efforts towards exploring new
76+
and innovative ways for Kubernetes to better integrate with cloud providers, leveraging the external subsystems we've built over the years. This includes making Kubernetes smarter in
77+
hybrid environments where nodes in the cluster can run on both public and private clouds, as well as providing better tools and frameworks for developers of external providers to simplify and streamline their integration efforts.
78+
79+
With all the new features, tools, and frameworks being planned, SIG Cloud Provider is not forgetting about the other side of the equation: testing. Another area of focus for the SIG's future activities is the improvement of
80+
cloud controller testing to include more providers. The ultimate goal of this effort being to create a testing framework that will include as many providers as possible so that we give the Kubernetes community the highest
81+
levels of confidence about their Kubernetes environments.
82+
83+
If you're using a version older than v1.29 and haven't migrated to an external cloud provider yet, we recommend checking out our previous blog post [Kubernetes 1.29: Cloud Provider Integrations Are Now Separate Components](https://kubernetes.io/blog/2023/12/14/cloud-provider-integration-changes/).
84+
It provides detailed information on the changes we've made and offers guidance on how to migrate to an external provider. Starting in v1.31, in-tree cloud providers will be permanently disabled and removed from core Kubernetes components.
85+
86+
If you’re interested in contributing, come join our [bi-weekly SIG meetings](https://github.com/kubernetes/community/tree/master/sig-cloud-provider#meetings)!

0 commit comments

Comments
 (0)