日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
一篇學(xué)會istio安裝與部署

引言

Istio作為service mesh控制面的實(shí)施標(biāo)準(zhǔn),先部署起來。然而會有一個坑要注意,否則無法訪問到頁面。這個坑是個示例的bug,已被人提了issue,我也被坑了一把。

創(chuàng)新互聯(lián)建站專注于企業(yè)成都營銷網(wǎng)站建設(shè)、網(wǎng)站重做改版、龍沙網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、成都h5網(wǎng)站建設(shè)、商城建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)公司、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為龍沙等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

一、準(zhǔn)備工作

1.安裝Docker

通過命令行或者直接下載,由于網(wǎng)絡(luò)原因我直接下載安裝 ,下載地址:

 
 
 
 
  1. https://hub.docker.com/editions/community/docker-ce-desktop-mac 

2.驅(qū)動安裝

 
 
 
 
  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit 
  2. chmod +x docker-machine-driver-hyperkit 
  3. sudo mv docker-machine-driver-hyperkit /usr/local/bin/ 
  4. sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit 
  5. sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit 

3.安裝minikube

 
 
 
 
  1. curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ 

驗證版本

 
 
 
 
  1. $ minikube version 
  2. minikube version: v1.22.0 

4.啟動minikube

 
 
 
 
  1. $ minikube start  Darwin 10.15.7 上的 minikube v1.22.0  根據(jù)現(xiàn)有的配置文件使用 docker 驅(qū)動程序  Starting control plane node minikube in cluster minikube  Pulling base image ...  Updating the running docker "minikube" container ...  This container is having trouble accessing https://k8s.gcr.io  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/  正在 Docker 20.10.7 中準(zhǔn)備 Kubernetes v1.21.2…  Verifying Kubernetes components...    ? Using image gcr.io/k8s-minikube/storage-provisioner:v5  Enabled addons: storage-provisioner, default-storageclass  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default 

二、安裝與部署

1.下載istio

還是直接下載安裝包,當(dāng)前最新版本為1.11.0

 
 
 
 
  1. https://github.com/istio/istio/releases/tag/1.11.0 

2.設(shè)置環(huán)境變量

 
 
 
 
  1. vim ~/.bash_profileexport PATH=$PATH:/Users/yongliang/istio/istio-1.11.0/binsource ~/.bash_profile 

3.安裝istio

 
 
 
 
  1. $ istioctl install --set profile=demo -y Istio core installed Istiod installed Egress gateways installed Ingress gateways installed Installation complete 

4.創(chuàng)建istio命名空間

 
 
 
 
  1. kubectl create namespace istio-system 

5.設(shè)置自動注入envoy

 
 
 
 
  1. $ kubectl label namespace default istio-injection=enablednamespace/default labeled 

6.驗證istio版本

 
 
 
 
  1. $ istioctl versionclient version: 1.11.0control plane version: 1.11.0data plane version: 1.11.0 (8 proxies) 

小結(jié):輸出可以看出安裝的istio客戶端版本、控制面板版本和數(shù)據(jù)面版本。

三、部署示例程序

1.部署示例

示例在安裝目錄sample目錄下

 
 
 
 
  1. -rw-r--r--@ 1 yongliang staff 11348 8 13 00:17 LICENSE-rw-r--r--@ 1 yongliang staff 5866 8 13 00:17 README.mddrwxr-x---@ 3 yongliang staff 96 8 13 00:17 bin-rw-r-----@ 1 yongliang staff 854 8 13 00:17 manifest.yamldrwxr-xr-x@ 5 yongliang staff 160 8 13 00:17 manifestsdrwxr-xr-x@ 21 yongliang staff 672 8 13 00:17 samplesdrwxr-xr-x@ 5 yongliang staff 160 8 13 00:17 tools 
  2.  
  3. $ kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yamlservice/details createdserviceaccount/bookinfo-details createddeployment.apps/details-v1 createdservice/ratings createdserviceaccount/bookinfo-ratings createddeployment.apps/ratings-v1 createdservice/reviews createdserviceaccount/bookinfo-reviews createddeployment.apps/reviews-v1 createddeployment.apps/reviews-v2 createddeployment.apps/reviews-v3 createdservice/productpage createdserviceaccount/bookinfo-productpage createddeployment.apps/productpage-v1 created 

2.服務(wù)啟動情況

 
 
 
 
  1. $ kubectl get servicesNAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGEdetails       ClusterIP   10.100.65.41             9080/TCP   4d2hkubernetes    ClusterIP   10.96.0.1                443/TCP    4d4hproductpage   ClusterIP   10.107.21.144            9080/TCP   4d2hratings       ClusterIP   10.110.139.187           9080/TCP   4d2hreviews       ClusterIP   10.106.238.130           9080/TCP   4d2h 

pods為Running狀態(tài)

 
 
 
 
  1. $ kubectl get podsNAME                              READY   STATUS    RESTARTS   AGEdetails-v1-79f774bdb9-bkrbp       2/2     Running   4          4d2hproductpage-v1-6b746f74dc-2c55l   2/2     Running   4          4d2hratings-v1-b6994bb9-7nvs2         2/2     Running   4          4d2hreviews-v1-545db77b95-mffvg       2/2     Running   4          4d2hreviews-v2-7bf8c9648f-pmqw8       2/2     Running   4          4d2hreviews-v3-84779c7bbc-sztp8       2/2     Running   4          4d2h 

3.把應(yīng)用關(guān)聯(lián)到istio網(wǎng)關(guān)

 
 
 
 
  1. $ kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yamlgateway.networking.istio.io/bookinfo-gateway createdvirtualservice.networking.istio.io/bookinfo created 

4.分析istio配置信息

 
 
 
 
  1. $ istioctl analyze? No validation issues found when analyzing namespace: default. 

5.設(shè)置入站IP和端口

端口設(shè)置

 
 
 
 
  1. $ export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')$ export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}') 

打印出來看看

 
 
 
 
  1. $ echo "$INGRESS_PORT"31688$ echo "$SECURE_INGRESS_PORT"31908 

設(shè)置入站IP

在官方提供的命令中是下面一段:

 
 
 
 
  1. $ export INGRESS_HOST=$(minikube ip) 
  2. $ minikube ip192.168.49.2 

注意:照著執(zhí)行后發(fā)現(xiàn)最后無法訪問,下面有修正。

啟動minikube隧道

 
 
 
 
  1. $ minikube tunnel  The service istio-ingressgateway requires privileged ports to be exposed: [80 443]  sudo permission will be asked for it.  Starting tunnel for service istio-ingressgateway. 

修正網(wǎng)關(guān)地址

官方為命令:

 
 
 
 
  1. $ export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT 

需要修正為:

 
 
 
 
  1. $ export GATEWAY_URL=127.0.0.1 
  2. $ echo "$GATEWAY_URL"127.0.0.1 

備注:修正原因參見issue地址 https://github.com/istio/istio.io/issues/9340

6.瀏覽器訪問頁面

7.安裝Kiali儀表盤

 
 
 
 
  1. $ kubectl apply -f samples/addons$ kubectl rollout status deployment/kiali -n istio-systemdeployment "kiali" successfully rolled out 

啟動儀表盤

 
 
 
 
  1. $ istioctl dashboard kialihttp://localhost:20001/kiali 

備注:當(dāng)訪問http://127.0.0.1/productpage時可以在儀表盤中觀察到流量的流向和服務(wù)之間的關(guān)系。


文章題目:一篇學(xué)會istio安裝與部署
網(wǎng)頁路徑:http://m.5511xx.com/article/dhsipcd.html