helm添加仓库
helm repo add aliyuncs https://apphub.aliyuncs.com
安装
helm search repo ingress
// 指定主机网络共享模式
helm install nginx-ingress aliyuncs/nginx-ingress --set controller.hostNetwork=true,rbac.create=true,controller.replicaCount=1
配置 tomcat
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: tomcat-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "nginx"
namespace: default
spec:
rules:
- host: tomcat.com
http:
paths:
- path: /
backend:
serviceName: tomcat
servicePort: 8080
网友评论