Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the super-useful native Kubernetes deployment tools?

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What are the local Kubernetes deployment tools that are super easy to use? I believe many inexperienced people are at a loss about this. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Before we discuss this topic, we would like to ask a question:

Do we local developers really need a Kuberntees? Is this necessary?

I don't think this answer is necessary. Not all local developers need to have a separate Kubernetes cluster to use, but if one of the following requirements is met, you will need to create a local Kubernetes cluster:

1. The application you develop is closely related to Kubernetes, for example, the application uses Kubernetes API, and this type of application needs to be deployed in Kubernetes to function.

two。 The developed application needs to use some Kubernetes resources to see the difference, such as making sure that the application works as expected when Kubernetes HPA occurs. This type of application will also require a local Kubernetes cluster to be tested.

3. The developers themselves are the infrastructure maintenance personnel of the company. For example, to design the connectivity test of Jenkins and Kubernetes, you may need to do the relevant testing locally before officially going to the company environment. The advantage may be that you don't have to turn on the cloud machine first, you can save money first, and use VM to test related functions.

4. The developed application has many dependencies, such as Redis, Kafaka, Memcached, etc., in which case it may be more convenient to have a local Kuberentes.

In addition to the above reasons (there must be other scenarios, which will not be listed here), I think all the remaining scenarios can be completed through Docker/Docker-Compose for developers to test.

If you think about it today and confirm that there is a real need to test Kuberntes locally, we can think about how I would like to use this native Kubernetes for a developer.

Personally, I want this solution to have the following features:

Hongmeng official Strategic Cooperation to build HarmonyOS Technology Community

Easy to set up and build, preferably with a few buttons

Can be done with instructions without any UI intervention

Ability to simulate multi-node

It's best to package all of the above into a script and finish running a command.

Next we recommend four different sets of open source software: Kubeadm, Minikube, KIND, and K3D.

Kubeadm

Kubeadm is an open source project maintained by the government. I think it is a very simple way to test, and it will maintain Kubelet through systemd.

After that, the core Kubernetes components such as controller/scheduler/kube-proxy are started by container.

It is not difficult to use the aspect Kubeadm itself, you can create all the necessary resources through the instruction line, and the only thing to note is that after the installation, you also need to manually install the CNI solution before the entire Kubernetes is installed.

Kubeadm itself also supports setting up multi-node clusters, but it is not so convenient to use. You need to create Master nodes and generate corresponding token/key, and then other nodes use the instructions of kubeadm to join the clusters that have been created.

Generally speaking, Kubeadm can meet the above requirements, but it will be a bit troublesome in implementation, especially in the case of multiple nodes. In addition, the installation of CNI also needs to be handled by itself, but it is easy to use as a single-node test environment.

Minikube

Minikube is also an official maintenance project, and its own architecture initially relies on VM (virtual machine) to help users create a new test Kubernetes cluster, which can be easily used by developers on any platform, because it will help you build a new VM behind it. When VM is up, it will help you set up and set up Kubernetes clusters through kubeadm, and help you install CNI and other commands.

In addition to relying on VM, it also provides different layers. For example, none can be built directly on this machine through kubeadm. Basically, the whole architecture will become very similar to kubeadm. The big difference is that CNI will also help you install it.

In addition, Mnikube itself also has some of its own packages, which can be packaged with some functions. My idea for this function is neither good nor bad. The good thing is to provide an environment for users to test the functions, which is really convenient. The downside is that it may make users think that these functions are inherent in Kubernetes, but will be misunderstood. It is not even clear about the principle behind it, so it is hastily learned.

Generally speaking, Minikube can also meet some of the above requirements, and the multi-node part may run with multiple VM to build, consuming a little more resources.

KIND

The full name of KIND is Kubernetes In Docker, as the name implies, all the nodes of Kubernetes are run in the way of Docker, and each Docker Container is a Kubernetes node, which can be used as Worker or Master.

Use aspect is very simple, use KIND instructions with a setting file can easily set up Kubernetes cluster, because all the operations are completed by KIND, so to establish a multi-node way is also very simple, as long as the setting file describes how many nodes and their respective identities, and then an instruction to complete all, even CNI aspects do not need to deal with, KIND will take care of itself.

Generally speaking, KIND can meet all the above requirements, and the multi-node part is managed by Docker, so it has good results in terms of resources and startup speed. With Vagrant, you can easily package a multi-node VM environment for testers to develop, which is really convenient.

K3D

K3D is the Docker version of K3S developed by Rancher. K3S is a lightweight Kubernetes platform, which is suitable for some low computing resource systems.

K3D transplants K3S directly to Docker, which makes it more convenient for users to create a K3S cluster.

It is also very simple to use, the whole main architecture is on the K3D execution file, using this instruction with different parameters can quickly establish a multi-node Kubernetes Cluster, in addition, you can also dynamically add nodes through the instruction, which is also very convenient to use.

Like KIND, the CNI part will be handled at the same time, so the user really only needs one instruction to handle everything. Generally speaking, K3D can meet all the above requirements, and the advantages are basically similar to KIND. With Vagrant, it is really easy to build a multi-node simulation environment.

After reading the above, have you mastered the methods of the local Kubernetes deployment tools that are very useful? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report