istio 安装与bookinfo示例运行
目的
本文旨在帮助想了解istio安装和运行bookinfo示例的同学快速入门
前置准备
安装k8s和helm
1、k8s安装
修改主机名
hostnamectl set-hostname k8s-master
hostnamectl set-hostname k8s-node
配置阿里云yum源环境和gpg校验配置
docker-ce
/etc/yum.repos.d目录下
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo kubernetes
/etc/yum.repos.d目录下 vim kubenetes.repo [kubernetes]
name=Kubernetes Repo
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
enabled=1
gpg校验配置
wget https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
wget https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
rpm --import rpm-package-key.gpg
rpm --import yum-key.gpg
根据官方示例安装kubeadm(安装1.15.4版本k8s)
yum install -y docker-ce kubelet-1.15.4 kubeadm-1.15.4 kubectl-1.15.4
按照官方示例设置环境参数
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/
kubeadm init运行使用阿里云镜像
kubeadm init \
--image-repository registry.aliyuncs.com/google_containers \
--pod-network-cidr=10.244.0.0/16
其中10.244.0.0/16是 flannel网络必加参数
2、helm安装
1.下载安装
wget https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz
tar -zxf helm-v2.14.3-linux-amd64.tar.gz
cd linux-amd64
chmod +x helm
mv helm /usr/local/bin
2.确保您拥有一个为Tiller定义了集群管理员角色的服务帐户
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.3/install/kubernetes/helm/helm-service-account.yaml
3.使用阿里镜像安装tiller,同时将repo 改为微软提供的helm repo
helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.14.3 --stable-repo-url http://mirror.azure.cn/kubernetes/charts/ --service-account=tiller
Istio安装
1.下载安装包
参考地址:https://istio.io/docs/setup/#downloading-the-release
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.3.1 sh -
cd istio-1.3.1
export PATH=$PWD/bin:$PATH
2.通过helm install与Helm和Tiller一起安装istio
参考地址: https://istio.io/docs/setup/install/helm/
使用kubectl apply安装所有Istio自定义资源定义(CRD),并等待几秒钟以在Kubernetes API服务器中提交CRD:
helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system --set gateways.istio-ingressgateway.type=NodePort
使用以下命令验证是否已将所有23个Istio CRD都提交给Kubernetes api服务器:
kubectl get crds | grep 'istio.io' | wc -l
选择一个配置文件,然后安装与您选择的文件相对应的istio图表:
helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
--values install/kubernetes/helm/istio/values-istio-demo.yaml \
--set gateways.istio-ingressgateway.type=NodePort
3.运行bookinfo示例
参考地址: https://istio.io/docs/examples/bookinfo/
kubectl label namespace default istio-injection=enabled
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl get pods
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
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}')
export INGRESS_HOST=<k8s-node ip>
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
浏览器访问http://${GATEWAY_URL}/productpage
更多示例参考:https://istio.io/docs/tasks/
istio 安装与bookinfo示例运行的更多相关文章
- 部署Bookinfo示例程序详细过程和步骤(基于Kubernetes集群+Istio v1.0)
部署Bookinfo示例程序详细过程和步骤(基于Kubernetes集群+Istio v1.0) 部署Bookinfo示例程序 在下载的Istio安装包的samples目录中包含了示例应用程序. ...
- Kurento安装与入门02——运行示例前的准备
官方一共提供了13个示例,这些示例运行的方式大同小异,一般会提供JAVA.Browser JavaScript.Node.js三种版本,这里仅演示java版本的示例.这些示例要求系统内已经正确安装了K ...
- Thrift在Windows及Linux平台下的安装和使用示例
本文章也同时发表在个人博客Thrift在Windows及Linux平台下的安装和使用示例上. thrift介绍 Apache Thrift 是 Facebook 实现的一种高效的.支持多种编程语言的R ...
- Redis 安装与简单示例
Redis 安装与简单示例 一.Redis的安装 Redis下载地址如下:https://github.com/dmajkic/redis/downloads 解压后根据自己机器的实际情况选择32位或 ...
- S2X环境搭建与示例运行
S2X环境搭建与示例运行 http://dbis.informatik.uni-freiburg.de/forschung/projekte/DiPoS/S2X.html 环境 Maven proje ...
- Appium(JAVA)Windows 7系统搭建及示例运行
Appium(JAVA)Windows 7系统搭建及示例运行 分类: Appium 2014-11-14 17:44 4323人阅读 评论(2) 收藏 举报 1.搭建Android环境 http:// ...
- ubuntu16.04 docker kubernetes(k8s) istio 安装
版本: docker: 19.03.5 kubernetes: 1.17.0 istio: 1.4.3 步骤一:给ubuntu换源 https://www.cnblogs.com/lfri/p/106 ...
- istio1.2.2 安装及使用示例
前言 本文介绍istio的安装及使用 dashboard,grafana,prometheus,kiali,jaeger的配置示例.演示通过istio的ingressgateway统一访问入口 Ist ...
- 沁恒CH32F103C8T6(二): Linux PlatformIO环境配置, 示例运行和烧录
目录 沁恒CH32F103C8T6(一): Keil5环境配置,示例运行和烧录 沁恒CH32F103C8T6(二): Linux PlatformIO环境配置, 示例运行和烧录 StdPeriphLi ...
随机推荐
- nginx 实践配置
nginx.conf文件 user root; worker_processes 1; error_log logs/error.log crit; #error_log logs/error.log ...
- ide的debug
webstom 新建立一个配置项 找到webpack.config.js,最后一行加上 devtool: "source-map" 然后点击debug
- NameValuePair 简单名称值对节点类型
/// <summary> /// 组装普通文本请求参数用于post请求 /// </summary> /// <param name="parameters& ...
- [Vue]method与计算属性computed、侦听器watch与计算属性computed的区别
一.方法method与计算属性computed的区别 方法method:每当触发重新渲染时,调用方法method将总会再次执行函数: 计算属性computed:计算属性computed是基于它们的响应 ...
- Visual Studio新建类自动添加注释
修改 VS中新建类的模板 如以下地址:D:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplatesCache\CSha ...
- NopCommerce的autofac的理解
nop项目4.1是core.2.1开发的,Startup.cs文件开始 从入口进去ServiceCollectionExtensions这个文件 this IServiceCollection ser ...
- 在windows部署service
首先,需要在环境变量的path中加入Install Util的路径: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 注意这里的Framework\v2.0 ...
- SpringBoot项目的限流
开发访问量比较大的系统是,爬虫的目的就是解决访问量大的问题:缓存穿透是为了保护后端数据库查询服务:计数服务解决了接近真实访问量以及数据库服务的压力. 架构图 限流 就拿十万博客来说,如果存在热点文章, ...
- Spark机器学习API之特征处理(一)
Spark机器学习库中包含了两种实现方式,一种是spark.mllib,这种是基础的API,基于RDDs之上构建,另一种是spark.ml,这种是higher-level API,基于DataFram ...
- JS ES7
指数运算符(幂) ** console.log(3 ** 2); //9 判断数组中包含 Array.prototype.includes(value) var arr1 = [1,2,'a','b' ...