侧边栏壁纸
博主头像
背锅小王子博主等级

我从事运维工作有十年之久,主要从事云原生相关的工作,对k8s、devops、servicemesh、可观察性等较为熟悉!

  • 累计撰写 59 篇文章
  • 累计创建 64 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

higress云原生网关控制台

背锅小王子
2023-04-01 / 0 评论 / 0 点赞 / 252 阅读 / 474 字
温馨提示:
本文最后更新于 2023-04-01,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

1、升级higress

因为控制台能是0.7版本才推出的,所以我们需要先升级higress

基于 helm 实现版本升级

helm repo update

helm upgrade higress -n higress-system higress.io/higress 

从 0.5.x 版本升级到最新版本

选项一:移除 Istio 依赖

helm repo update

helm upgrade higress -n higress-system --set global.enableMesh=false higress.io/higress 

kubectl wait -n higress-system deployment/higress-controller deployment/higress-gateway --for=condition=Available

helm delete istio -n istio-system

kubectl delete ns istio-system

kubectl get crd -oname | grep --color=never 'istio.io' | xargs kubectl delete

选项二:保留 Istio

helm repo update

helm upgrade higress -n higress-system --set global.enableMesh=true higress.io/higress

因测试需要,我们使用方式一,移除 Istio 依赖来部署,具体如下:

helm upgrade higress -n higress-system \
--set global.enableMesh=false higress.io/higress \
--set global.enableIstioAPI=true \
--set global.hostNetwork=true \
--set image.pullPolicy=IfNotPresent \
--set domain=console.bgxwz.com \
--set tlsSecretName="bgxwz-com-tls" \
--set admin.password.value=12345678

说明:因为是测试,所以console的密码设置的较为简单,如果在企业中使用的话,建议设置为复杂的密码

查看服务

kubectl get po -n higress-system
NAME                                  READY   STATUS    RESTARTS   AGE
higress-console-6978686965-b65d5      1/1     Running   0          1h
higress-controller-699b8d9bc6-jqwfn   2/2     Running   0          1h
higress-gateway-9ccb8f86f-rtfwj       1/1     Running   0          1h
higress-gateway-6b958f694-d2mnc       1/1     Running   0          1h

注意:

如果你使用的k8s版本为1.22并且Linux的内核版本为3.10的话,更新会出现 higress-gateway 报错,报错信息如下:
图片-1680324356648

这时候可以按照如下方式修改:higress-gateway

gateway:
  securityContext:
    sysctls: ~
  containerSecurityContext:
    capabilities:
      drop:
      - ALL
      add:
      - NET_BIND_SERVICE
    runAsUser: 0
    runAsGroup: 1337
    runAsNonRoot: false
    allowPrivilegeEscalation: true
    readOnlyRootFilesystem: true

该配置会以特权运行,为了安全考虑,建议:

  • 升级内核至 >=4.11 版本.
  • 或者在 3.10 版本内核中使用 < 1.22 版本的 Kubernetes.

2、登录

默认用户名为:admin,密码为我们上面设置的密码

图片-1680337187992

图片-1680337374392

0

评论区