V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
IurNusRay
0.54D
V2EX  ›  Python

请教一下 k8s 服务暴露的问题

  •  
  •   IurNusRay · Dec 11, 2020 · 3063 views
    This topic created in 1972 days ago, the information mentioned may be changed or developed.
    如果使用 ingress-nginx 的话,还需要给 controller 绑定一个 NodePort 来暴露它吗,我这样实现了访问,但有没有其他方式呢
    7 replies    2020-12-17 16:24:12 +08:00
    zhangjx1991
        2
    zhangjx1991  
       Dec 14, 2020
    可以使用 LoadBalancer,可以看一下这篇文章: https://zhuanlan.zhihu.com/p/266422557
    IurNusRay
        3
    IurNusRay  
    OP
       Dec 16, 2020
    @zhangjx1991 没太明白这篇文章的意思,是指在内网中如果要创建 type=locaBalancer 的服务,就需要使用 MetaLB 这个额外插件吗
    zhangjx1991
        4
    zhangjx1991  
       Dec 16, 2020
    @IurNusRay 对,大部分云厂商是可以使用 LB 的,但是如果内网要用 LB 的话,需要用 metalb 这个插件
    IurNusRay
        5
    IurNusRay  
    OP
       Dec 17, 2020
    @zhangjx1991 那如果我有一台云主机,不想用 LB,只是需要把某个 k8s service 暴露在它的公网 ip 上呢,除了 nodePort 还有什么方法吗?实际生产中都是用云厂商的 LB 吗?
    zhangjx1991
        6
    zhangjx1991  
       Dec 17, 2020
    @IurNusRay 嗯嗯,我了解的是这样的,除了 ingress-nginx 之外,还有 istio-ingressgateway,traefik-ingress,ambassador 等,但其实最终还是通过 NodePort 映射出去的
    IurNusRay
        7
    IurNusRay  
    OP
       Dec 17, 2020
    @zhangjx1991 好吧,谢谢了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1068 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 18:22 · PVG 02:22 · LAX 11:22 · JFK 14:22
    ♥ Do have faith in what you're doing.