|
2 | 2 | layout: blog
|
3 | 3 | title: "DIY: Create Your Own Cloud with Kubernetes (Part 3)"
|
4 | 4 | slug: diy-create-your-own-cloud-with-kubernetes-part-3
|
5 |
| -date: 2024-03-11 |
| 5 | +date: 2024-04-05 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | **Author**: Andrei Kvapil (Ænix)
|
9 | 9 |
|
10 | 10 | Approaching the most interesting phase, this article delves into running Kubernetes within Kubernetes. Technologies such as Kamaji and Cluster API are highlighted, along with their integration with KubeVirt.
|
11 | 11 |
|
12 |
| -Previous discussions have covered [preparing Kubernetes on bare metal](/blog/2024/01/22/diy-create-your-own-cloud-with-kubernetes-part-1/) and [how to turn Kubernetes into virtual machines management system](/blog/2024/01/22/diy-create-your-own-cloud-with-kubernetes-part-2). This article concludes the series by explaining how, using all of the above, you can build a full-fledged managed Kubernetes and run virtual Kubernetes clusters with just a click. |
| 12 | +Previous discussions have covered [preparing Kubernetes on bare metal](/blog/2024/04/05/diy-create-your-own-cloud-with-kubernetes-part-1/) and [how to turn Kubernetes into virtual machines management system](/blog/2024/04/05/diy-create-your-own-cloud-with-kubernetes-part-2). This article concludes the series by explaining how, using all of the above, you can build a full-fledged managed Kubernetes and run virtual Kubernetes clusters with just a click. |
13 | 13 |
|
14 | 14 | First up, let's dive into the Cluster API.
|
15 | 15 |
|
@@ -58,10 +58,9 @@ The [Kamaji](https://github.com/clastix/kamaji) project offers a ready solution
|
58 | 58 | [Kubeadm](https://github.com/kubernetes-sigs/cluster-api/tree/main/bootstrap) as the Bootstrap Provider - as the standard method for preparing clusters in Cluster API. This provider is developed as part of the Cluster API itself. It requires only a prepared system image with kubelet and kubeadm installed and allows generating configs in the cloud-init and ignition formats.
|
59 | 59 |
|
60 | 60 | It's worth noting that Talos Linux also supports provisioning via the Cluster API and [has](https://github.com/siderolabs/cluster-api-bootstrap-provider-talos) [providers](https://github.com/siderolabs/cluster-api-bootstrap-provider-talos) for this.
|
61 |
| -Although previous articles discussed using Talos Linux to set up a management cluster on bare-metal nodes, to provision tenant clusters the Kamaji+Kubeadm approach has more advantages. |
| 61 | +Although [previous articles](/blog/2024/04/05/diy-create-your-own-cloud-with-kubernetes-part-1/) discussed using Talos Linux to set up a management cluster on bare-metal nodes, to provision tenant clusters the Kamaji+Kubeadm approach has more advantages. |
62 | 62 | It facilitates the deployment of Kubernetes control planes in containers, thus removing the need for separate virtual machines for control plane instances. This simplifies the management and reduces costs.
|
63 | 63 |
|
64 |
| - |
65 | 64 | ## How it works
|
66 | 65 |
|
67 | 66 | The primary object in Cluster API is the Cluster resource, which acts as the parent for all the others. Typically, this resource references two others: a resource describing the **control plane** and a resource describing the **infrastructure**, each managed by a separate provider.
|
@@ -95,7 +94,7 @@ In most cases, this is sufficient, but depending on the providers used, you may
|
95 | 94 |
|
96 | 95 | At this stage, you already have a ready tenant Kubernetes cluster, but so far, it contains nothing but API workers and a few core plugins that are standardly included in the installation of any Kubernetes cluster: **kube-proxy** and **coredns**. For full integration, you will need to install several more components:
|
97 | 96 |
|
98 |
| -To install additional components, you can use a separate [Cluster API Add-on Provider for Helm](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm), or the same [FluxCD](https://fluxcd.io/) discussed in [previous articles](https://deploy-preview-45498--kubernetes-io-main-staging.netlify.app/blog/2024/01/22/diy-create-your-own-cloud-with-kubernetes-part-1/). |
| 97 | +To install additional components, you can use a separate [Cluster API Add-on Provider for Helm](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm), or the same [FluxCD](https://fluxcd.io/) discussed in [previous articles](/blog/2024/04/05/diy-create-your-own-cloud-with-kubernetes-part-1/). |
99 | 98 |
|
100 | 99 | When creating resources in FluxCD, it's possible to specify the target cluster by referring to the kubeconfig generated by Cluster API. Then, the installation will be performed directly into it. Thus, FluxCD becomes a universal tool for managing resources both in the management cluster and in the user tenant clusters.
|
101 | 100 |
|
@@ -161,4 +160,4 @@ Now you have a fully functional Kubernetes cluster with the capability for dynam
|
161 | 160 |
|
162 | 161 | Going forward, you might consider metrics and logs collection from your tenant clusters, but that goes beyond the scope of this article.
|
163 | 162 |
|
164 |
| -Of course, all the components necessary for deploying a Kubernetes cluster can be packaged into a single Helm chart and deployed as a unified application. This is precisely how we organize the deployment of managed Kubernetes clusters at the push of a button on our open PaaS platform, [Cozystack](https://cozystack.io/), where you can try all the technologies described in the article for free. |
| 163 | +Of course, all the components necessary for deploying a Kubernetes cluster can be packaged into a single Helm chart and deployed as a unified application. This is precisely how we organize the deployment of managed Kubernetes clusters with the click of a button on our open PaaS platform, [Cozystack](https://cozystack.io/), where you can try all the technologies described in the article for free. |
0 commit comments