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 ...
随机推荐
- # Ubuntu子系统安装配置
目录 Ubuntu子系统安装配置 安装配置 终端美化 卸载 和win10之间的交互 Ubuntu子系统安装配置 亲测启动速度毫秒之间 安装配置 系统升级到一周年正式版及以上(1607) 依次在 设置 ...
- selenium登录4399
from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from seleni ...
- 「网络流 24 题」最长 k 可重区间集
给定区间集合$I$和正整数$k$, 计算$I$的最长$k$可重区间集的长度. 区间离散化到$[1,2n]$, $S$与$1$连边$(k,0)$, $i$与$i+1$连边$(k,0)$, $2n$与$T ...
- 记笔记的软件(vnote)
前面我们已经把我们的 Ubuntu 系统在物理机上运行起来了,也做了一些简单的优化,教了大家怎么使用 Ubuntu 系统自带的应用商店和 apt 安装和卸载软件.接着我们安装了搜狗输入法,现在我们的系 ...
- 怎样快捷获取元素节点head
1. 使用: document.head document.head.nodeName; // "HEAD" 2. 使用: document.getElementsByTagNam ...
- oracle_多表查询02
多表查询 select * from BONUS; select * from DEPT; select * from EMP; select * from SALGRADE; BONUS表 ENAM ...
- Rikka with Competition hdu 6095
签到题目,排序然后按序清理掉一定会输的结果就可以. ac代码: #include <iostream> #include <cstdio> #include <cstri ...
- Docker Registry搭建
一.前言 Docker官方镜像仓库 访问速度很慢,Docker Registry允许搭建我们自己的镜像仓库,为实现镜像拉取.推送提供便利. 二.安装与启动 1.创建目录 mkdir /usr/loca ...
- 6.单表的CRUD操作
1.插入后用新id初始化被插入对象 <insert id="insertStudentCatchId"> insert into student (age,name,s ...
- 编译luacheck Linux版
最近在写Visual Studio Code的Lua插件,需要把luacheck集成进去.但是luacheck默认只提供了win32版本,见https://github.com/mpeterv/lua ...