ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

k8s 安装 istio 的坑

2020-08-13 16:00:41  阅读:1520  来源: 互联网

标签:kubectl root istioctl istio master k8s 安装 bash


本文针对于二进制部署的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

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有