部署higress到华为云

higress 部署与上云

k3s环境准备

[root@vm ~]# curl https://releases.rancher.com/install-docker/19.03.sh | sh
[root@vm ~]# curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

[root@vm ~]# curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -


[root@vm ~]# mkdir -p $HOME/.kube
[root@vm ~]# cp /etc/rancher/k3s/k3s.yaml  $HOME/.kube/config
[root@vm ~]# kubectl get pod

helm准备

[root@vm ~]# wget https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz
[root@vm ~]# tar xf helm-v3.14.0-linux-amd64.tar.gz
[root@vm ~]# mv linux-amd64/helm /usr/local/bin/
[root@vm ~]# helm repo add higress.io https://higress.io/helm-charts
[root@vm ~]# helm repo update
[root@vm ~]# helm search repo higress
NAME                            CHART VERSION   APP VERSION     DESCRIPTION
higress.io/higress              1.3.5           1.3.5           Helm chart for deploying Higress gateways
higress.io/higress-console      1.3.3           1.3.3           Management console for Higress
higress.io/higress-core         1.3.5           1.3.5           Helm chart for deploying higress gateways
higress.io/higress-local        0.6.1           0.6.1           Helm chart for deploying higress gateways
higress.io/istio                1.12.4          1.12.4          Helm chart for deploying higress istio
higress.io/istio-local          1.12.4          1.12.4          Helm chart for deploying higress istio
[root@vm ~]# helm fetch higress.io/higress
[root@vm ~]# tar xf higress-1.3.5.tgz
[root@vm ~]# ls higress
Chart.lock  Chart.yaml  LICENSE  README.md  charts

直接安装

[root@vm ~]# helm install higress -n higress-system  --create-namespace --render-subchart-notes  higress

部署到华为云

镜像拉取
[root@vm ~]# helm install higress -n higress-system  --create-namespace --render-subchart-notes --debug --dry-run higress>higress.yaml

[root@vm ~]# for i in `grep cn-hangzhou.cr.aliyuncs higress.yaml |grep image|cut -d '"' -f2`;do echo $i;done
[root@vm ~]# for i in `grep cn-hangzhou.cr.aliyuncs higress.yaml |grep image|cut -d '"' -f2`;do docker pull  $i;done

镜像上传到SWR
[root@vm ~]# for i in `docker images|grep higress|awk '{print($1":"$2)}'`;do 
docker tag $i swr.cn-south-1.myhuaweicloud.com/my-swr/${i##*/};
docker push swr.cn-south-1.myhuaweicloud.com/my-swr/${i##*/};done

镜像仓库地址修改

#查看
[root@vm ~]# helm install higress -n higress-system  --create-namespace --render-subchart-notes --debug --dry-run higress>higress.yaml
[root@ecs-5e7d-0001 ~]# grep -nr higress-registry higress
higress/charts/higress-core/values.yaml:53:  hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
higress/charts/higress-core/values.yaml:346:hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
higress/charts/higress-core/values.yaml:399:  hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
higress/charts/higress-core/values.yaml:490:  hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
higress/charts/higress-core/values.yaml:580:  hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
higress/charts/higress-console/values.yaml:9:  repository: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/console

#修改
[root@vm ~]# sed -i s#higress-registry.cn-hangzhou.cr.aliyuncs.com/higress#swr.cn-south-1.myhuaweicloud.com/my-swr#g higress/charts/higress-core/values.yaml
[root@vm ~]# sed -i s#higress-registry.cn-hangzhou.cr.aliyuncs.com/higress#swr.cn-south-1.myhuaweicloud.com/my-swr#g higress/charts/higress-console/values.yaml 

#安装
[root@vm ~]# helm install higress -n higress-system  --create-namespace --render-subchart-notes  higress
# deployment 添加镜像秘钥
higress-controller
higress-gateway
higress-console
...
	  restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      serviceAccountName: higress-console
      serviceAccount: higress-console
      securityContext: {}
      # 添加镜像秘钥
      imagePullSecrets:
        - name: default-secret
#service 对外发布
higress-console: 8080 -> 8080 / TCP	30080 / TCP	# 控制台
higress-gateway  LoadBalancer -- NodePort	# 流量入口
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值