k8s ingress-nginx 0.25.1 最新版部署和例子
发表于:2025-02-04 作者:千家信息网编辑
千家信息网最后更新 2025年02月04日,k8s ingress-nginx 0.25.1 最新版部署和例子说明https://github.com/kubernetes/ingress-nginx/blob/master/docs/depl
千家信息网最后更新 2025年02月04日k8s ingress-nginx 0.25.1 最新版部署和例子
k8s ingress-nginx 0.25.1 最新版部署和例子
说明
https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md增加了7层的识别能力,可以根据 http header, path 等进行路由转发
部署
wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yamlsed -i 's#quay.io/kubernetes-ingress-controller/nginx-ingress-controller#registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller#g' mandatory.yamlcat service-nodeport.yamlapiVersion: v1kind: Servicemetadata: name: ingress-nginx namespace: ingress-nginx labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginxspec: type: NodePort ports: - name: http port: 80 targetPort: 80 protocol: TCP nodePort: 32080 #http - name: https port: 443 targetPort: 443 protocol: TCP nodePort: 32443 #https selector: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx
kubectl create -f mandatory.yamlkubectl create -f service-nodeport.yaml
检查
kubectl get pod -n ingress-nginx -o widekubectl scale --replicas=2 deploy/nginx-ingress-controller -n ingress-nginx
例子
vim deploy-demo.yamlapiVersion: v1kind: Servicemetadata: name: myapp namespace: defaultspec: selector: app: myapp release: stable ports: - name: myapp port: 80 targetPort: 80---apiVersion: apps/v1kind: Deploymentmetadata: name: myapp namespace: defaultspec: selector: matchLabels: app: myapp release: stable replicas: 3 template: metadata: labels: app: myapp release: stable spec: containers: - name: myapp image: nginx imagePullPolicy: IfNotPresent ports: - name: myapp containerPort: 80vim ingress-myapp.yamlapiVersion: extensions/v1beta1kind: Ingressmetadata:name: ingress-myappnamespace: defaultannotations: kubernetes.io/ingress.class: "nginx"spec: rules: - host: httpd.hequan.com http: paths: - path: backend: serviceName: myapp servicePort: 80kubectl create -f deploy-demo.yamlkubectl create -f ingress-myapp.yaml #修改hosts node节点ip192.168.100.112 httpd.hequan.com 访问 httpd.hequan.com:32080
例子
最新版
能力
节点
路由
检查
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
固定ip 网站服务器
网络安全日主题画
王珊数据库系统概论网课百度云
上海微创网络技术有限公司估值
销售软件开发票开什么类目
主机改装打印服务器
网络安全专业在工作中的地位
数据库分离会删除数据库文件吗
网络安全必备技能之生活篇
宝山区大规模网络技术应用范围
服务器安装到固态硬盘
淄博沂源网络安全
湖南五年服务器
软件开发怎么谈薪资
mongodb跨数据库事务
北京哈希网络技术有限公司
多可服务器管理工具
入侵客户端改数据库
数据库原理与技术2020
天津软件开发精选柚米科技
电商平台软件开发服务
网络安全手抄报模板内容资料
珠海服务软件开发定制
网络安全法 网络安全
国家实行网络安全的保护制度是
在电子表格中快速填充数据库
山丘之王服务器
软件开发 岗位指标库
深圳服务器机柜哪家靠谱
数据库技术的语句