In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to install and deploy Kubernetes. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
As an important component of Rancher 2.0, Rancher Kubernetes Engine (RKE) has been officially released! This is a new open source project launched by Rancher Labs, a Kubernetes installer that is extremely easy to use, lightning fast, and supports all infrastructure (public cloud, private cloud, VM, physical machine, etc.).
Why do a brand new K8s installer?
In the past two years, Rancher has become one of the most popular and popular platforms for creating and managing Kubernetes clusters. Because of its easy-to-use features and extremely simple user experience, Rancher is favored by a large number of users around the world as a platform for creating and managing Kubernetes. Rancher fully automates the operation of etcd, Kubernetes master, and worker nodes. However, Rancher 1.x only provides Kubernetes deployment optimization, and 2.0 will continue to strengthen further optimization and support for the use and operation of Kubernetes.
At this stage, there are a number of installers available for users to choose from to create Kubernetes clusters. As far as we can see, the two most popular installers are kops and Kubespray:
Kops is perhaps the most widely used Kubernetes installer. In fact, it is more than just an installer. Kops provides users with all the cloud resources they may need, which can be used to install Kubernetes and connect to cloud monitoring services to ensure the continuous operation of the Kubernetes cluster. However, Kops is too tightly integrated with the underlying cloud infrastructure and performs best on AWS, while other infrastructure platforms such as GCE and vSphere are not supported.
Kubespray is a stand-alone Kubernetes installer written in Ansible. It can install Kubernetes clusters on any server and is very popular with users. Although Kubespray has some degree of integration with various cloud API, it is basically cloud-independent, so it can work with any cloud, virtualized cluster, or bare metal server. At present, Kubespray has developed into a complex project involving a large number of developers.
Kubeadm is another installation tool distributed with the major version of Kubernetes. However, Kubeadm does not support features such as HA clustering. Although some kubeadm code is used in projects such as kops and Kubespray, kubeadm is not suitable as a production Kubernetes installer.
Rancher 2.0 can support and manage any Kubernetes cluster. We encourage users to use public cloud hosting services such as GKE and AKS. For users who want to build their own clusters, we are considering integrating kops or Kubespray into our product lineup. Kops does not meet our needs because it does not apply to all cloud providers. In fact, Kubespray is very close to what we need, especially the feature that Kubespray can install Kubernetes anywhere. But in the end, we decided not to use Kubespray, but to build our own lightweight installer for two reasons:
We can start over and take advantage of Kubernetes itself to build a simpler system.
As with installing Kubernetes in Rancher 1.6, we can have a faster installer by using a container-based approach.
How RKE works
RKE is a separate executable file that reads from the cluster configuration file and starts, shuts down, or upgrades the Kubernetes cluster. The following is an example configuration file:
-auth: strategy: x509network: plugin: flannelssh_key_path: / home/user/.ssh/id_rsanodes:-address: server1 user: ubuntu role: [controlplane Etcd]-address: server2 user: ubuntu role: [worker] services: etcd: image: quay.io/coreos/etcd:latest kube-api: image: rancher/k8s:v1.8.3-rancher2 service_cluster_ip_range: 10.233.0.0 extra_args 18 extra_args: v: 4 kube-controller: image: rancher/k8s:v1.8.3-rancher2 cluster_cidr: 10.233.64.0 image 18 service_ Cluster_ip_range: 10.233.0.0 18 scheduler: image: rancher/k8s:v1.8.3-rancher2 kubelet: image: rancher/k8s:v1.8.3-rancher2 cluster_domain: cluster.local cluster_dns_server: 10.233.0.3 infra_container_image: gcr.io/google_containers/pause-amd64:3.0 kubeproxy: image: rancher/k8s:v1.8.3-rancher2addons: | ApiVersion: v1 kind: Pod metadata: name: my-nginx namespace: default spec: containers:-name: my-nginx image: nginx ports:-containerPort: 80
As shown above, we start the file by specifying the authentication policy, network model, and local SSH key path. The main body of the cluster profile consists of the following three parts:
The node section describes all the servers that make up the Kubernetes cluster. Each node assumes one or more of the three roles: controlplane, etcd, and worker. You can add or remove nodes from the Kubernetes cluster by changing the node section and rerunning the RKE command.
The services section describes all the system services running on the Kubernetes cluster. RKE packages all system services as containers.
The plug-in section describes the user-level programs that run on the Kubernetes cluster. Therefore, RKE users can specify Kubernetes cluster configuration and application configuration in the same file.
RKE is not a long-running service that can monitor and operate Kubernetes clusters. RKE needs to be used with a complete container management system like Rancher 2.0 or an independent monitoring system like AWS CloudWatch, Datadog, or Sysdig. When used together, you can build your own scripts to monitor the health of the RKE cluster.
RKE: embedded Kubernetes installer
When users need to build a distributed application system, they often have to deal with the problems of back-end database, data access layer, cluster and extension. Now, instead of using traditional application servers, more and more developers are using Kubernetes as a distributed application platform:
Developers use etcd as the back-end database.
Developers use Kubernetes Custom Resource Definition (CRD) as the data access layer and use kubectl to perform basic CRUD operations on their data models.
Developers package the application as a container and use Kubernetes to cluster and scale.
Applications built in this way are sent to the user as Kubernetes YAML files. Users can easily run these applications if they are already running a Kubernetes cluster or have access to public cloud-hosted Kubernetes services such as GKE or AKS. But what about users who want to install applications on virtualized or bare metal servers?
Application developers can address these requirements by bundling RKE into the application as an embedded Kubernetes installer. By calling RKE, the application installation can be started and a Kubernetes cluster is created for the user. We have noticed that embedding lightweight installers such as RKE into distributed applications meets many of the interests and needs of users.
Move forward for the popularity of Kubernetes
Rancher Kubernetes Engine (RKE) adheres to the characteristics of Rancher products that are always easy to use, easy to operate and user-friendly, which makes the process of creating Kubernetes clusters easier, and we believe that Kubernetes installation through cloud management platform is the best choice for most Kubernetes users.
At Rancher Labs, we hope that Kubernetes will one day become a standardized infrastructure supported by all cloud service providers, and we have been working to achieve this vision. Rancher 2.0, which has been released in a technical preview and will be officially released in early 2018, will be able to manage and import Kubernetes clusters of any type from any cloud provider, including RKE, AWS EKS, Google Container Engine (GKE), Azure Container Service (AKS), and so on.
Thank you for reading! This is the end of this article on "how to install and deploy Kubernetes". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.