k8s 安装 istio 的坑
作者:互联网
本文针对于二进制部署的k8s安装istio1.67版本
没有设置admin.conf的小伙伴请参考
https://www.cnblogs.com/Tempted/p/13469772.html
1、检查k8s dns svc 启动是否正常
访问不到svc错误,请检查K8S 上dns服务是否正常
error citadelclient Failed to create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup istiod.istio-system.svc on 10.254.0.2:53: read udp 172.30.1.57:52724->10.254.0.2:53: i/o timeout"
2、master 上需要部署一个node节点,并设置为不可调度
1,不可调度 kubectl cordon master kubectl uncordon master #取消 2,驱逐已经运行的业务容器 kubectl drain --ignore-daemonsets --delete-local-data master 3,如果想删除node 节点,则进行这个步骤 kubectl delete node master
自动注入错误
Error creating: Internal error occurred: failed calling webhook "sidecar-injector.istio.io": Post https://istio-sidecar-injector.istio-system.svc:443/inject?timeout=30s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
此错误是因为master节点访问不了集群内部的Service(istio-sidecar-injector),导致自动注入失败。
安装istio
一、下载
官方地址:
https://preliminary.istio.io/latest/zh/docs/setup/getting-started/
github 下载地址
https://github.com/istio/istio/releases/
二、配置
[root@master ~]# tar -zxf istio-1.6.7-linux-amd64.tar.gz [root@master ~]# cd istio-1.6.7 添加istioctl 环境变量 [root@master ~]# vi ~/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH=$PATH:/root/istio-1.6.7/bin export PATH [root@master ~]# source ~/.bash_profile 添加istio自动补全工具 [root@master ~]# cp tools/istioctl.bash ~/.istioctl.bash [root@master ~]# source ~/.istioctl.bash
c-bash: _get_comp_words_by_ref: command not found 碰到这样的错误解决方法:
yum install bash-completion -y source /usr/share/bash-completion/bash_completion source ~/.istioctl.bash
三、安装
以官方为主:https://preliminary.istio.io/latest/zh/docs/setup/getting-started/
1、安装demo配置
istioctl manifest apply --set profile=demo
2、卸载
istioctl manifest generate --set profile=demo | kubectl delete -f -
标签:kubectl,root,istioctl,istio,master,k8s,安装,bash 来源: https://www.cnblogs.com/Tempted/p/13496917.html