In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to build Istio micro-service grid in Kubernetes cluster". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Use sealos deployment to quickly deploy K8S cluster 1.1. Basic environment configuration 1. Set the hostname hostnamectl set-hostname k8s-masterhostnamectl set-hostname k8s-node1hostnamectl set-hostname k8s-node22. Close selinux and firewall setenforce 0sed-ri'/ ^ SELINUX=/c SELINUX=disabled' / etc/sysconfig/selinux sed-ri'/ ^ SELINUX=/c SELINUX=disabled' / etc/selinux/config systemctl stop firewalldsystemctl disable firewalld1.2. Deploy the K8S cluster 1.sealos official website to get the software package [root@k8s-master1] # ll total usage 507472 root 552591411 August 5 2021 kube1.19.16.tar.gz-rw-r--r-- 1 root root 44322816 April 29 13:47 sealos2. Upload the kube1.19.16.tar.gz file to all k8s nodes 3. Install sealos [root @ k8s-master1 ~ / soft] # chmod + x sealos & & mv sealos / usr/bin [root@k8s-master1 ~ / soft] # sealos versionVersion: 3.3.9-rc.3Last Commit: 4db4953Build Date: 2021-04-10T11:25:04Z4. Deploy K8S1.19.16 version [root@k8s-master ~] # sealos init-- passwd 'teacher'-- master 192.168.20.10-- node 192.168.20.11-- node 192.168.20.12-- pkg-url / root/kube1.19.16.tar.gz-- version v1.19.16
two。 Deploy Istio grid service 2.1. 1 in K8S cluster. Download Istio installation package [root@k8s-master ~] # curl-L https://istio.io/downloadIstio | ISTIO_VERSION=1.8.2 TARGET_ARCH=x86_64 sh-
After the download is completed, it will be automatically decompressed into a directory.
2.2. View the list of available configurations for Istio. 1. Prepare the istio command [root@k8s-master ~] # cp istio-1.8.2/bin/istioctl / usr/bin/2. Check the list of available configurations [root@k8s-master ~] # istioctl profile listIstio configuration profiles: default # default configuration file with rich features. It is recommended to use demo # for quick start and moderate configuration. Not suitable for performance testing empty minimal # least functional component set configuration openshift preview remote # is used to configure the shared control plane of the multi-cluster service grid 3. Specify the installed configuration file $istioctl install-- set profile=demo-y
Differences between common configuration files and installation components
Component name defaultdemominmalremoteistio-citadel √√√ istio-ingressgateway √√ istio-galley √√ istio-egressgateway √ istio-nodeagentistio-pilot √√√ istio-policy √√ istio-sidecar-injector istio-telemetry √√ grafana √ istio-tracing √ kiali √ prometheus √√
We use default configuration file to deploy istio grid. The istioctl install command does not specify any configuration file. The default is default configuration file.
1. Install istio [root @ k8s-master ~] # istioctl install-yDetected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/v1.8/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details. ✔ Istio core installed ✔ Istiod installed ✔ Ingress gateways installed ✔ Installation complete 2. View the resources created by istio in the K8S cluster [root@k8s-master ~] # kubectl get all-n istio-systemNAME READY STATUS RESTARTS AGEpod/istio-ingressgateway-559f565fcd-jxn5b 1 7m46spod/istiod-545bb98448-vqf84 1 Running 0 7m46spod/istiod-545bb98448-vqf84 1 Running 0 12mNAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGEservice/istio-ingressgateway LoadBalancer 10.107.107.206 15021:32381/TCP 80:31105/TCP,443:30793/TCP,15012:32259/TCP,15443:31377/TCP 7m45sservice/istiod ClusterIP 10.109.130.252 15010/TCP,15012/TCP,443/TCP 15014/TCP 12mNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/istio-ingressgateway 1/1 1 1 7m46sdeployment.apps/istiod 1/1 1 1 12mNAME DESIRED CURRENT READY AGEreplicaset.apps/istio-ingressgateway-559f565fcd 1 1 1 7m46sreplicaset.apps/istiod-545bb98448 1 1 1 12mNAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGEhorizontalpodautoscaler . autoscaling/istio-ingressgateway Deployment/istio-ingressgateway / 80% 51 7m45shorizontalpodautoscaler.autoscaling/istiod Deployment/istiod / 80% 51 12m# programs deployed 2 The service resources of istiod and istio-ingressgateway#istio-ingressgateway expose a set of ports through loadblancer. We can access applications in istio through these ports. Loadblancer needs to rely on the public cloud load balancer, so we are not in the pending state, but the service resource is also available. If there is no public cloud load balancer in loadblancer, the nodeport type will be used for port mapping by default.
2.3. Show the configuration information of Istio configuration file
You can show the configuration of Istio.
[root@k8s-master] # istioctl profile dump default2.4. View the contents of the YAML file used by Istio in the K8s cluster deployment # display the contents of the yaml orchestration file used by istio in the K8s cluster deployment [root@k8s-master istio-1.8.2] # istioctl manifest generate # import the orchestration file contents into the file [root@k8s-master istio-1.8.2] # istioctl manifest generate > istio-generate.yaml# later when you do not use istio, you can directly uninstall istio$ kubectl delete-f istio-generate.yaml through this file
This is the end of the content of "how to build Istio Micro Service Grid in Kubernetes Cluster". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.