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

Cluster binary deployment of Kubernetes

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

On the left above is my personal Wechat. For further communication, please add Wechat. On the right is my official account "Openstack Private Cloud". If you are interested, please follow us.

Originally, I always wanted to be lazy and use kubernetes's kubeadmin deployment tool to automate deployment. However, due to the problem of the software installation source, I was not familiar with the interrelationship of the relevant modules. In addition, because I did not use it in the work and did not have enough enthusiasm, this experiment had not been completed. Later, I subscribed to a Subscription account to introduce kubernetes, or honestly followed the master to install through the binary package. This will also give you a better understanding of the entire architecture of k8s. Refer to this website:

Https://blog.51cto.com/lizhenliang/2325770

Or use pve virtualization environment to create a test virtual machine, 2-core CPU, 4G memory, and 32G hard disk dome 2 Nic:

Install the environment software version of the operating system CentOS7.2_x64Docker18-ceKubernetes1.12

Server role

Role IP component k8sLecture mastery 192.168.1.41kubeqiang apiserververse kubewashi controllercontrollercontrollermanagement department kubek8s quotation node1192.168.1.42kubeletflannelpaper et cdk8s color node2192.168.1.43kubeletfldk8s color node2192.168.1.43kubeletlanguage proxymand

For more information on the operation, please see "reprint: Kubernetes v1.12 binary deployment Cluster (HTTPS+RBAC)"

The following is the verification content:

Check the cluster status on the master node: # kubectl get nodeNAME STATUS ROLES AGE VERSION192.168.1.42 Ready 30s v1.12.5192.168.1.43 Ready 13s v1.12.December kubectl get csNAME STATUS MESSAGE ERRORcontroller-manager Healthy ok scheduler Healthy ok etcd- 0 Healthy {"health": "true"} etcd-2 Healthy {"health": "true"} etcd-1 Healthy {"health": "true"} run a test example

Create a Nginx Web to test whether the cluster is working properly:

# kubectl run nginx-image=nginx-replicas=3# kubectl expose deployment nginx-port=88-target-port=80-type=NodePort

View Pod,Service:

# kubectl get podsNAME READY STATUS RESTARTS AGEnginx-dbddb74b8-dlkfl 1 to 1 Running 0 44snginx-dbddb74b8-m558r 1 to 1 Running 0 44snginx-dbddb74b8-pwdc9 1 to 1 Running 0 44s# kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEkubernetes ClusterIP 10.0.0.1 443 / TCP 90mnginx NodePort 10.0.0.208 88:48882/TCP 26s

Access the Nginx deployed in the cluster and open the browser and enter: http://192.168.1.42:48882/ http://192.168.1.43:48882/, which can be opened in both node, 192.168.1.42 and 192.168.1.43. As follows:

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