Kubernetes+istio部署bookinfo、Online boutique和sock shop

Kubernetes+istio部署bookinfo、Online boutique和sock shop

bookinfo

# 创建相应的namespace
kubectl create ns bookinfo
# 切换namespace
kubectl config set-context $(kubectl config current-context) --namespace=bookinfo
# 设置命名空间自动注入边车
kubectl label ns bookinfo istio-injection=enabled
# 去掉master节点的所有污点,使其参加工作负载
kubectl taint nodes --all node-role.kubernetes.io/master-
# 进入到istio-xxxx目录下
cd istio-xxx
# 直接部署
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
# 查看 bookinfo命名空间下的pods状况,和分布节点
kubectl get pods -owide
# 查看服务端口和CLUSTER-IP,可在集群内部主机访问
kubectl get svc

kubectl config :修改kubeconfig文件https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_config/
kubectl label:设置对象配置https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_label/
kubectl label ns bookinfo istio-injection=enabled:设置命名空间自动注入边车https://istio.io/v1.5/zh/docs/setup/additional-setup/sidecar-injection/
kubectl taint:设置污点,https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/

online-boutique

# 创建命名空间
[root@k8smaster ~]# kubectl create ns online-boutique
# 切换命名空间
[root@k8smaster ~]# kubectl config set-context $(kubectl config current-context) --namespace=online-boutique
# 设置自动注入边车
[root@k8smaster ~]# kubectl label ns online-boutique istio-injection=enabled
# 安装git
[root@k8smaster ~]# yum -y install git
# 创建并进入文件夹
[root@k8smaster ~]# mkdir online-boutique
[root@k8smaster ~]# cd online-boutique/
# 克隆源码
[root@k8smaster online-boutique]# git clone https://github.com/GoogleCloudPlatform/microservices-demo.git
[root@k8smaster online-boutique]# cd microservices-demo/
[root@k8smaster microservices-demo]# cd release/
# 换源
[root@k8smaster release]# sed -i 's/gcr.io/gcr.lank8s.cn/' kubernetes-manifests.yaml
# 部署
[root@k8smaster release]# kubectl apply -f /root/online-boutique/microservices-demo/release/kubernetes-manifests.yaml -n online-boutique
# 查看 命名空间下的pods状况,和分布节点
[root@k8smaster release]# kubectl get pods -owide
# 查看服务端口和CLUSTER-IP,可在集群内部主机访问
[root@k8smaster release]# kubectl get svc

yum -y:回答全部问题为是

sock-shop

[root@k8smaster release]# kubectl create namespace sock-shop
[root@k8smaster release]# kubectl apply -n sock-shop -f "https://github.com/microservices-demo/microservices-demo/blob/master/deploy/kubernetes/complete-demo.yaml?raw=true"
# 查看 bookinfo命名空间下的pods状况,和分布节点
[root@k8smaster release]# kubectl get pods -owide
# 查看服务端口和CLUSTER-IP,可在集群内部主机访问
[root@k8smaster release]# kubectl get svc

参考

https://www.cnblogs.com/renshengdezheli/p/16841875.html#%E4%BA%94%E9%83%A8%E7%BD%B2online-boutique%E5%BA%94%E7%94%A8

https://ylong.net.cn/k8s-cluster-deploy.html

相关推荐

  1. ClickHouse安装部署

    2023-12-07 10:18:04       47 阅读
  2. Zookeeper集群部署单机部署

    2023-12-07 10:18:04       11 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-07 10:18:04       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-07 10:18:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-07 10:18:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-07 10:18:04       18 阅读

热门阅读

  1. ios 逆向分分析,某业帮逆向算法(二)

    2023-12-07 10:18:04       38 阅读
  2. python使用flask框架实现http服务处理

    2023-12-07 10:18:04       36 阅读
  3. Redis 底层数据结构 - 简单动态字符串

    2023-12-07 10:18:04       31 阅读
  4. 【ML】LSTM应用——预测股票(基于 tensorflow2)

    2023-12-07 10:18:04       39 阅读
  5. ffmpeg 同时采集麦克风和摄像头并录制文件

    2023-12-07 10:18:04       24 阅读
  6. RDMA编程实例rdma_cm API

    2023-12-07 10:18:04       25 阅读