In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to configure Cluster API". In daily operation, I believe many people have doubts about how to configure and use Cluster API. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to configure and use Cluster API". Next, please follow the editor to study!
Cluster API is a Kubernetes project that uses declarative Kubernetes-style API for cluster creation, configuration, and management. It implements these functions by using CustomResourceDefinitions (CRDs) to extend the API exposed by Kubernetes API Server, thus allowing users to create new resources, such as clusters (Kubernetes clusters) and Machine (Machine of the nodes that make up the cluster). The controller of each resource is then responsible for responding to changes to these resources to start the cluster. API is designed to allow different infrastructure providers to integrate with it, providing specific logic for their environment.
The Cluster API project is still in its early stages, but the current situation has proved that it can bring powerful features. this
Past: v1alpha1
Initially, the v1alpha1 implementation of Cluster API required the provider to include the Cluster API controller code in its project and implement actuator (interface) to handle the specific logic of its environment (for example, a call to the cloud provider API). This code runs as a provider-specific manager binary that manages a controller for each resource needed to manage the cluster.
Now: v1alpha2
The pain point with the v1alpha1 method using Cluster API is that it requires each provider to implement a certain amount of bootstrap boilerplate code, that is, the code is inflexible and verbose. To solve this problem, v1alpha2 introduced bootstrap provider, which is responsible for generating the data needed to transform Machine into a Kubernetes node. Kubeadm bootstrap provider handles this task in all environments by using kubedam. Its default behavior is to generate a cloud-config script for each Machine that can be used with bootstrap nodes.
Another change introduced by v1alpha2 is that the provider no longer needs to include the Cluster API controller code in its project. And Cluster API provides independent controllers that are responsible for core types. For more information about these changes, see the information on Github.
For this release, you now need to deploy three managers (instead of the previous one):
Cluster API manager: used to manage core v1alpha2 resources
Bootstrap provider manager: used to manage resources to generate data that transforms Machine into Kubernetes nodes
Infrastructure provider manager: used to manage the resources that provide the infrastructure needed to run the cluster
For example, if I want to use kubedam to create a cluster on a configured GCP, I should deploy Cluster API manager (for reconciling core resources, such as cluster and Machine resources), kubeadm bootstrap provider (for example, reconciling KubeadmConfig resources), and GCP infrastructure provider (for reconciling specific resources of the environment, such as GCPClusters and GCPMachines).
To understand how to apply these resources, we will use the Kubernetes infrastructure provider implementation I wrote for cluster deployment, that is, the provider of the infrastructure provided by Kubernetes itself. The Kubernetes node runs as a Kubernetes Pod using a kind image.
First, we need to create a basic cluster to provide the infrastructure for our Cluster API cluster. We will use GKE. The following command assumes that you have installed the gcloud and GCP projects and set up your account.
Warning: the gcloud command will incur some costs, and you can also consider using the GCP free package.
Calico will serve as the CNI solution for Cluster API clusters. Some special configurations are required when configuring a GKE cluster to route packets encapsulated by IPv4. In order not to distract the descriptions of Cluster API behaviors in this article, we will run them directly here without explaining them in detail.
Gcloud container clusters create management-cluster--cluster-version=1.14-image-type=UBUNTUCLUSTER_CIDR=$ (gcloud container clusters describe management-cluster--format= "value (clusterIpv4Cidr)") gcloud compute firewall-rules create allow-management-cluster-pods-ipip-source-ranges=$CLUSTER_CIDR-allow=ipipkubectl apply-f
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.