In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to deploy the Kubernetes cluster plug-in". In the daily operation, I believe many people have doubts about how to deploy the Kubernetes cluster plug-in. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to deploy the Kubernetes cluster plug-in". Next, please follow the editor to study!
Kubernetes cluster plug-in
Plug-ins are accessory components of the Kubernetes cluster, which enrich and improve the features of the cluster. The plug-ins introduced here are coredns, Dashboard, and Metrics Server. It should be noted that the manifests yaml files with plug-ins in kuberntes use gcr.io 's docker registry, and the domestic wall needs to be manually replaced with other registry addresses or downloaded on the FQ server in advance, and then synchronized to the corresponding K8s deployment machine.
1-Kubernetes cluster plug-in-coredns
You can download the image of the wall from the gcr.io free agent provided by Microsoft China; the following deployment commands are executed on the k8s-master01 node.
1) modify the configuration file to extract the downloaded kubernetes-server-linux-amd64.tar.gz, and then extract the kubernetes-src.tar.gz file. After [root@k8s-master01 ~] # cd / opt/k8s/work/kubernetes [root@k8s-master01 kubernetes] # tar-xzvf kubernetes-src.tar.gz is decompressed, the coredns directory is cluster/addons/dns. [root@k8s-master01 kubernetes] # cd / opt/k8s/work/kubernetes/cluster/addons/dns/coredns [root@k8s-master01 coredns] # cp coredns.yaml.base coredns.yaml [root@k8s-master01 coredns] # source / opt/k8s/bin/environment.sh [root@k8s-master01 coredns] # sed-I-e / ${CLUSTER_DNS_SVC_IP} / "coredns.yaml2) create coredns [root@k8s-master01 coredns] # fgrep" image ". / *. / coredns.yaml: image: k8s.gcr.io/coredns:1.3.1./coredns.yaml: imagePullPolicy: IfNotPresent./coredns.yaml.base: image: k8s.gcr.io/coredns:1.3.1./coredns.yaml.base: imagePullPolicy: IfNotPresent./coredns .yaml.in: image: k8s.gcr.io/coredns:1.3.1./coredns.yaml.in: imagePullPolicy: IfNotPresent./coredns.yaml.sed: image: k8s.gcr.io/coredns:1.3.1./coredns.yaml.sed: imagePullPolicy: IfNotPresent download "k8s.gcr.io/coredns:1.3.1" image ahead of FQ Then upload it to the node node and execute "docker load." Import the command into the images image of the node node or download the image of the wall from the free gcr.io agent provided by Microsoft China, and then update the download address of the coredns image in the modified yaml file and make sure that the image pull policy in the corresponding yaml file is IfNotPresent. That is, if you have a local image, use the local image. Do not pull and then create coredns again [root@k8s-master01 coredns] # kubectl create-f coredns.yaml3) check the coredns function (wait a moment after executing the following command Ensure that the READY status is available) [root@k8s-master01 coredns] # kubectl get all-n kube-systemNAME READY STATUS RESTARTS AGEpod/coredns-5b969f4c88-pd5js 1 Running 0 55sNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEservice/kube-dns ClusterIP 10.254.0.2 53 9153/TCP 56sNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/coredns 1 to 1 1 1 57sNAME DESIRED CURRENT READY AGEreplicaset.apps/coredns-5b969f4c88 1 1 1 56s to view the pod status of the created coredns Make sure there is no error [root@k8s-master01 coredns] # kubectl describe pod/coredns-5b969f4c88-pd5js-n kube-system..Events: Type Reason Age From Message-Normal Scheduled 2m12s default-scheduler Successfully assigned kube-system/coredns-5b969f4c88-pd5js to k8s-node03 Normal Pulled 2m11s kubelet K8s-node03 Container image "k8s.gcr.io/coredns:1.3.1" already present on machine Normal Created 2m10s kubelet, k8s-node03 Created container coredns Normal Started 2m10s kubelet, k8s-node03 Started container coredns4) create a new Deployment [root@k8s-master01 coredns] # cd / opt/k8s/work [root@k8s-master01 work] # cat > my-nginx.yaml
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.