1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "mysql.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "mysql.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "mysql.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "mysql.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论






























收起资源包目录



















共 15 条
- 1
资源评论


xiegwei
- 粉丝: 504
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 基于嵌入式系统的LCD电子时钟方案设计书.doc
- (源码)基于Python和Flask框架的学习经验分享平台.zip
- 全国PLC方案设计书师大学本科方案设计书2.doc
- 计算机应用技术对企业信息化的影响探究.docx
- 《C语言程序设计方案》练习题.doc
- 交通信号控制双向协调调试技术探讨.doc
- -单片机数字电子钟设计方案与研究报告-.doc
- 国家大学科技园徐州软件基地#楼工程量清单和招标控制价的编制毕业设计论文终稿.doc
- 互联网+社区养老模式构建对策.docx
- 操作系统学习课程设计方案指导书-.doc
- 分层教学法在中职计算机课程教学中的应用.docx
- 基于VB图书管理系统大学本科方案设计书.doc
- 试论网络思想政治教育的可能性分析.docx
- (源码)基于C++和SFML库的Tetris Clone游戏项目.zip
- 大学生应用计算机进行冶金相关软件开发的探究.docx
- 8.无线网络安全破解与防御.ppt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
