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 ...
随机推荐
- C++版 归并排序
在原作者基础上加入注释 原作者:https://www.cnblogs.com/agui521/p/6918229.html 归并排序:归并排序(英语:Merge sort,或mergesort),是 ...
- easyUI datagrid 刷新取消加载信息 自动刷新闪屏问题
<style type="text/css"> /*-- 消除grid屏闪问题 --//*/ .datagrid-mask { opacity: 0; filter: ...
- xpath的一些常用使用
xml文档<html> <head> <title>My page</title> </head> <body> <h2& ...
- (转)查找算法:二叉排序树(BSTree)
二叉排序树(Binary Sort Tree),又称为二叉查找树(Binary Search Tree) ,即BSTree. 构造一棵二叉排序树的目的,其实并不是为了排序,而是为了提高查找和插入删除的 ...
- DeepMind提出新型超参数最优化方法:性能超越手动调参和贝叶斯优化
DeepMind提出新型超参数最优化方法:性能超越手动调参和贝叶斯优化 2017年11月29日 06:40:37 机器之心V 阅读数 2183 版权声明:本文为博主原创文章,遵循CC 4.0 BY ...
- MySQL - 性能优化 & MySQL常见SQL错误用法(转载)
1. LIMIT 语句 分页查询是最常用的场景之一,但也通常也是最容易出问题的地方.比如: , ; 一般DBA想到的办法是在type, name, create_time字段上加组合索引.这样条件排序 ...
- 1-MySQL DBA笔记-理解MySQL
第一部分 入门篇 本篇首先介绍MySQL的应用领域.基础架构和版本,然后介绍MySQL的基础知识,如查询的执行过程.权限机制.连接.存储引擎,最后阐述一些基础概念. 第1章 理解MySQL 本章将介绍 ...
- Lambda表达式使用方法整理
匿名内部类 Lambda表达式 匿名内部类 ...
- wpf win10 popup位置偏移问题
同样问题参照: https://stackoverflow.com/questions/18113597/wpf-handedness-with-popups 解决方案: private static ...
- 这段时间大量网站被k的原因分析
百度这次更新的K站幅度比较大,通过对被k网站的分析,没有发现文章类型网站有降权现象,主要集中在企业网站上.分析大约30发个网站发现共同明显的特征就是这样的网站有大量的页面只有一张或者两张图片,而这些网 ...