日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

k8s部署ingress:使用heptio-contour部署ingress controller(通过sealos安装,非nginx-ingress类型)

發(fā)布時間:2025/1/21 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 k8s部署ingress:使用heptio-contour部署ingress controller(通过sealos安装,非nginx-ingress类型) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

詳解





代碼

概覽

[root@m-1 ingress]# tree . ├── deploy-svc.sh ├── deploy.yaml ├── example-ingress.yaml ├── ingress.tar └── svc.yaml0 directories, 5 files

部署ingress

sealos install --pkg-url ./ingress.tar

deploy-svc.sh

[root@m-1 ingress]# cat deploy-svc.sh #!/bin/bashsudo kubectl create deploy web --image=nginx:1.14-alpine -n dmgeo -o yaml > deploy.yaml sudo kubectl expose deploy web --port=80 --target-port=80 --type=NodePort -n dmgeo -o yaml > svc.yaml

example-ingress.yaml

[root@m-1 ingress]# cat example-ingress.yaml apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata:name: example-ingressnamespace: dmgeo spec:rules:- host: example.ingressdemo.comhttp:paths:- path: /backend:serviceName: webservicePort: 80

查看ingress端口

[root@m-1 ingress]# sudo kubectl get -n heptio-contour service contour -o wide NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR contour LoadBalancer 10.97.190.104 <pending> 80:18181/TCP,443:4408/TCP 35m app=contour [root@m-1 ingress]#

效果

參考鏈接:
https://github.com/bsmr/heptio-contour

總結(jié)

以上是生活随笔為你收集整理的k8s部署ingress:使用heptio-contour部署ingress controller(通过sealos安装,非nginx-ingress类型)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。