In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article shares with you how to configure Master02 in kubernetes. The article covers the configuration and use of Master02. I hope you can get something through this article.
Server role assignment role address installation component master192.168.142.220kube-apiserver kube-controller-manager kube-scheduler etcdmaster02192.168.142.120kube-apiserver kube-controller-manager kube-schedulernode1192.168.142.136kubelet kube-proxy docker flannel etcdnode2192.168.142.132kubelet kube-proxy docker flannel etcdnginx1192.168.142.130nginx keepalivednginx2192.168.142.140nginx keepalived 1, Master02 configuration
All operations before the delimiter are performed on master01
Copy directory to master02
Copy the kubernetes directory to master02
[root@master K8s] # scp-r / opt/kubernetes/ root@192.168.142.120:/opt
Copy the etcd directory to master02
Master02 must have an etcd certificate, otherwise the apiserver service cannot be started
[root@master K8s] # scp-r / opt/etcd/ root@192.168.142.120:/opt replication service startup script
Kube-apiserver.service kube-controller-manager.service kube-scheduler.service
[root@master K8s] # scp / usr/lib/systemd/system/ {kube-apiserver,kube-controller-manager,kube-scheduler} .service root@192.168.142.120:/usr/lib/systemd/system/ modify service script
In fact, you only need to modify the apiserver.
[root@master02 K8s] # cd / opt/kubernetes/cfg/ [root@master02 cfg] # vim kube-apiserverKUBE_APISERVER_OPTS= "--logtostderr=true\-- etcd-servers= https://192.168.142.220:2379,https://192.168.142.136:2379, Https://192.168.142.132:2379\ # Note address change-- bind-address=192.168.142.120\-- secure-port=6443\ # Note address change-- advertise-address=192.168.142.120\-- allow-privileged=true\-- service-cluster-ip-range=10.0.0.0/24\-- enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota,NodeRestriction\-- authorization-mode=RBAC Node\-kubelet-https=true\-- enable-bootstrap-token-auth\-- token-auth-file=/opt/kubernetes/cfg/token.csv\-- service-node-port-range=30000-50000\-- tls-cert-file=/opt/kubernetes/ssl/server.pem\-- tls-private-key-file=/opt/kubernetes/ssl/server-key.pem\-- client-ca-file=/opt/kubernetes/ssl/ca.pem\-- service-account-key-file=/opt/kubernetes / ssl/ca-key.pem\-- etcd-cafile=/opt/etcd/ssl/ca.pem\-- etcd-certfile=/opt/etcd/ssl/server.pem\-- etcd-keyfile=/opt/etcd/ssl/server-key.pem "start the service [root@master02 cfg] # systemctl start kube-apiserver.service [root@master02 cfg] # systemctl start kube-controller-manager.service [root@master02 cfg] # systemctl start kube-scheduler.service result verification / / add environment variable [ Root@master02 cfg] # vim / etc/profile// add export PATH=$PATH:/opt/kubernetes/bin/ [root@master02 cfg] # source / etc/profile// at the end of [root@master02 cfg] # kubectl get nodeNAME STATUS ROLES AGE VERSION192.168.142.132 Ready 2d12h v1.12.3192.168.142.136 Ready 38h v1.12.3
After reading this article, have you learned how to configure Master02 in kubernetes? 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.
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.