Kubernetes客户端库

本章将描述各种编程语言类型的Kubernetes API客户端库。

要使用Kubernetes REST API编写应用程序,你不需要自己编写API来调用、请求/响应等类型,可以直接使用现成的客户端库来实现。

客户端库经常是处理一些常见的任务,例如进行身份验证。

官方支持的Kubernetes客户端库

以下客户端库由Kubernetes SIG API Machinery维护。

Language Client Library Sample Programs
Go github.com/kubernetes/client-go/ browse
Python github.com/kubernetes-incubator/client-python/ browse

社区维护的客户端库

以下Kubernetes API客户端库由社区创建者维护,Kubernetes团队不会提供支持和维护。

Language Client Library
Clojure github.com/yanatan16/clj-kubernetes-api
Go github.com/ericchiang/k8s
Java (OSGi) bitbucket.org/amdatulabs/amdatu-kubernetes
Java (Fabric8, OSGi) github.com/fabric8io/kubernetes-client
Node.js github.com/tenxcloud/node-kubernetes-client
Node.js github.com/godaddy/kubernetes-client
Perl metacpan.org/pod/Net::Kubernetes
PHP github.com/devstub/kubernetes-api-php-client
PHP github.com/maclof/kubernetes-client
Python github.com/eldarion-gondor/pykube
Ruby github.com/Ch00k/kuber
Ruby github.com/abonas/kubeclient
Scala github.com/doriordan/skuber
K8S中文社区微信公众号

译者

Vincent

业精于勤 荒于嬉;行成于思 毁于随;

《Kubernetes客户端库》有146个想法

  1. 我使用python客户端库的代码如下:
    from kubernetes import client, config, watch

    # Configs can be set in Configuration class directly or using helper utility
    config.load_kube_config(config_file=”kubeconfig.yaml”)
    v1 = client.CoreV1Api()
    print(“Listing All services with their info:\n”)
    ret = v1.list_service_for_all_namespaces(watch=False)
    for i in ret.items:
    print(
    “%s \t%s \t%s \t%s \t%s \n” % (i.kind, i.metadata.namespace, i.metadata.name, i.spec.cluster_ip, i.spec.ports))

    但是会报
    OpenSSL.SSL.Error: [(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)]
    这是为啥?

    1. requests 库其实是基于 urllib 编写的,对 urllib 进行了封装,使得使用时候的体验好了很多,现在 urllib 已经出到了3版本,功能和性能自然是提升了不少。 所以,requests最新版本也是基于最新的 urllib3 进行封装。

      在urllib2时代对https的处理非常简单,只需要在请求的时候加上 verify=False 即可,这个参数的意思是忽略https安全证书的验证,也就是不验证证书的可靠性,直接请求, 这其实是不安全的,因为证书可以伪造,不验证的话就不能保证数据的真实性。

      http://www.updn.cn/2020/01/03/kubernetes-python-api%e4%b8%ad%e6%96%87%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e/

  2. Pingback: free tv dating site
  3. Pingback: good rx zithromax
  4. Pingback: nolva clomid pct
  5. Pingback: 60mg tadalafil daily
  6. Pingback: atl gay dating
  7. Pingback: ivermectin 12
  8. Pingback: online ivermectin
  9. Pingback: ivermectin fda
  10. Pingback: ivermectin humans
  11. Pingback: tadalafil lilly
  12. Pingback: stromectol sales
  13. Pingback: madridbet
  14. Pingback: meritking
  15. Pingback: furosemide tab 80mg
  16. Pingback: ielexusbet
  17. Pingback: trcasino
  18. Pingback: furosemide pharmacy
  19. Pingback: meritroyalbet
  20. Pingback: eurocasino
  21. Pingback: ivermectin buy canada
  22. Pingback: ivermectin 15 mg
  23. Pingback: madridbet
  24. Pingback: luckyland slots play
  25. Pingback: ivermectin online
  26. Pingback: ivermectin 3 mg dose
  27. Pingback: ivermectin medication
  28. Pingback: buy ivermectin online
  29. Pingback: stromectol ireland
  30. Pingback: stromectol 15 mg
  31. Pingback: ivermectin dengue
  32. Pingback: child porn
  33. Pingback: ivermectin for people
  34. Pingback: buy ivermectin nz
  35. Pingback: cialis price costco
  36. Pingback: ivermectin canada
  37. Pingback: ivermectin injection
  38. Pingback: do-posle-psihologa
  39. Pingback: bahis siteleri
  40. Pingback: fda ivermectin
  41. Pingback: 1mercenary
  42. Pingback: ivermectin 0.08%
  43. Pingback: grandpashabet
  44. Pingback: 2022-film
  45. Pingback: sikiş
  46. Pingback: madridbet
  47. Pingback: porn
  48. Pingback: meritking giriş
  49. Pingback: meritking
  50. Pingback: child porn
  51. Pingback: grandpashabet
  52. Pingback: meritking
  53. Pingback: izmir escort
  54. Pingback: fuck google
  55. Pingback: child porn
  56. Pingback: child porn
  57. Pingback: fuck google
  58. Pingback: porn
  59. Pingback: porn
  60. Pingback: ooohd3.ru
  61. Pingback: sex
  62. Pingback: porn
  63. Pingback: çeşme transfer
  64. Pingback: hd porno izle
  65. Pingback: izmir travesti
  66. Pingback: sikiş
  67. Pingback: yasam ayavefe
  68. Pingback: grandpashabet
  69. Pingback: grandpashabet
  70. Pingback: grandpashabet
  71. Pingback: child porn
  72. Pingback: cratosroyalbet
  73. Pingback: travesti.site
  74. Pingback: porn
  75. Pingback: child porn
  76. Pingback: child porn
  77. Pingback: kralbet twitter
  78. Pingback: vassycalvados.fr
  79. Pingback: lugabet giriş
  80. Pingback: betgross giriş
  81. Pingback: child porn
  82. Pingback: child porn
  83. Pingback: child porn
  84. Pingback: jojobet
  85. Pingback: jojobet twitter
  86. Pingback: child porn
  87. Pingback: meritking
  88. Pingback: child porn
  89. Pingback: child porn
  90. Pingback: child porn
  91. Pingback: animal porn
  92. Pingback: spinco
  93. Pingback: meritking
  94. Pingback: casino porna
  95. Pingback: marsbahis
  96. Pingback: porn
  97. Pingback: betine giriş
  98. Pingback: bursa travesti
  99. Pingback: fuck google
  100. Pingback: child porn
  101. Pingback: bmw
  102. Pingback: kadinlar
  103. Pingback: hardcore porn
  104. Pingback: istanbul travesti
  105. Pingback: ankara travesti
  106. Pingback: edebiyat tumblr
  107. Pingback: ankaratravesti.xyz
  108. Pingback: cocuk porno
  109. Pingback: child porn
  110. Pingback: sultangazi rent a car
  111. Pingback: rize tumblr
  112. Pingback: sex
  113. Pingback: prague erotic massage
  114. Pingback: prague tantra massage
  115. Pingback: gaziantep saat tamiri
  116. Pingback: Konya SEO Uzmanı
  117. Pingback: ankara psikolog

发表评论

电子邮件地址不会被公开。

Time limit exceeded. Please complete the captcha once again.