V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ghostheaven
V2EX  ›  Kubernetes

K8S 的 API server 暴露在公网运维管理的安全性

  •  
  •   ghostheaven · 2020-06-30 16:16:12 +08:00 · 2500 次点击
    这是一个创建于 1367 天前的主题,其中的信息可能已经有所发展或是发生改变。
    阿里云的 K8S 服务可以直接把 API server 暴露在公网上,这种方式安全吗?如果不安全的话,推荐什么样的方式管理? VPN 或 /和堡垒吗?
    4 条回复    2020-07-02 14:12:28 +08:00
    optional
        1
    optional  
       2020-06-30 16:20:09 +08:00
    理论上说证书不泄露问题不大。
    但是谁不把它放在防火墙后面,出问题谁背锅。
    ghostheaven
        2
    ghostheaven  
    OP
       2020-06-30 16:30:26 +08:00
    @optional 那我就放心了,用的是 serverless 的集群,API 服务是通过负载均衡暴露出来的。
    joesonw
        3
    joesonw  
       2020-06-30 18:38:14 +08:00
    @optional AWS 的做法感觉更好, 用的 aws 自己的认证 cli, 然后生成临时 token 用于访问.

    - name: arn:aws:eks:xxxx:cluster/yyy
    user:
    exec:
    apiVersion: client.authentication.k8s.io/v1alpha1
    args:
    - token
    - -i
    - prod
    command: aws-iam-authenticator
    env: null
    allposs
        4
    allposs  
       2020-07-02 14:12:28 +08:00
    可以对 api 的访问进行鉴权,可以了解一下 AuthN/AuthZ
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2712 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:33 · PVG 23:33 · LAX 08:33 · JFK 11:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.