1. 获取Gateway服务的访问地址: {{- if .Values.gateway.ingress.enabled }} 访问 Ingress: {{- range .Values.gateway.ingress.hosts }} http://{{ .host }} {{- end }} {{- else if eq .Values.gateway.service.type "LoadBalancer" }} 获取外部IP(可能需要等待): kubectl get svc {{ include "shop-recycle.fullname" . }}-gateway -n {{ .Release.Namespace }} --watch {{- else if eq .Values.gateway.service.type "ClusterIP" }} 使用Port Forward访问: kubectl port-forward svc/{{ include "shop-recycle.fullname" . }}-gateway 8080:{{ .Values.gateway.service.port }} -n {{ .Release.Namespace }} 然后访问: http://localhost:8080 {{- end }} 2. 检查Pod状态: kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} 3. 查看日志: kubectl logs -n {{ .Release.Namespace }} -l app=shop-recycle-gateway --tail=100 -f kubectl logs -n {{ .Release.Namespace }} -l app=shop-recycle-order-service --tail=100 -f kubectl logs -n {{ .Release.Namespace }} -l app=shop-recycle-payment-service --tail=100 -f 4. 测试API: curl http://localhost:8080/api/test/order curl http://localhost:8080/api/test/payment 5. 升级部署: helm upgrade shop-recycle k8s/helm/shop-recycle \ -f k8s/helm/shop-recycle/values.yaml \ -f k8s/helm/shop-recycle/values-{{ .Values.environment }}.yaml \ --set image.tag= 6. 回滚部署: helm rollback shop-recycle 环境信息: - Release: {{ .Release.Name }} - Namespace: {{ .Release.Namespace }} - Version: {{ .Chart.Version }} - App Version: {{ .Chart.AppVersion }} - Environment: {{ .Values.environment }}