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 报错,报错信息如下:
这时候可以按照如下方式修改: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,密码为我们上面设置的密码
评论区