• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ray1888
V2EX  ›  程序员

Kubernetes api 用例查询

  •  
  •   ray1888 ·
    ray1888 · May 17, 2018 · 2396 views
    This topic created in 2944 days ago, the information mentioned may be changed or developed.

    想请问一下,你们使用 Kubernetes httpapi 做二次开发的时候,是如何查找用例的呢?(官方文档里面是缺少了用例,只有大的字段,再里面一级的字段已经没有了),我现在用 minikube 来进行模拟开发,minikube (打开 swagger-ui 有问题,Kubernetes 本体是可以直接打开 swagger-ui 来查用例的吗?)

    3 replies    2018-05-18 18:10:16 +08:00
    reAsOn
        1
    reAsOn  
       May 17, 2018
    为什么不用官方提供的客户端?涵盖了非常多的语言了
    ray1888
        2
    ray1888  
    OP
       May 17, 2018
    @reAsOn
    因为我用官方的 Python 客户端会出现这样的问题
    ```
    MaxRetryError: HTTPSConnectionPool(host='172.17.57.56', port=8443): Max retries exceeded with url: /api/v1/pods (Caused by ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied')))

    ```
    运行环境是 minikube + ubuntu16.04
    reAsOn
        3
    reAsOn  
       May 18, 2018
    @ray1888 这个不是接口的问题,你用任何方式 access k8s 都会遇到的,你得去看一下 k8s 自己的鉴权相关的东西,如果是比较新的版本的话应该是 RBAC 这块
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5482 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 08:20 · PVG 16:20 · LAX 01:20 · JFK 04:20
    ♥ Do have faith in what you're doing.