API的设计和使用方式

如何开发一个容器平台

 

在项目deep-in-kubernetes查看有 grep -r "apiVersion" 写法。

 

api核心组     有两级           版本---资源

apis非核心    三级表示       分组---版本---资源

10-5-----Kubernetes API

 

修改api-server参数为  - --insecure-port=8080 测试

kubectl edit pods kube-apiserver-m1 -n kube-system -o yaml #
vim /etc/kubernetes/manifests/kube-apiserver.yaml
kubectl get pods kube-apiserver-m1 -n kube-system -o yaml

# 访问测试
curl http://localhost:8080/healthz

# 测试阿皮地址
curl http://localhost:8080/api/v1/nodes
curl http://localhost:8080/api/v1/pods

API官网  https://kubernetes.io/zh/docs/concepts/overview/kubernetes-api/   

Python客户端   

https://kubernetes.io/zh/docs/reference/using-api/client-libraries/

https://github.com/kubernetes-client/python/tree/master/examples

 

相关文章:

  • 2021-11-12
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-12-30
  • 2022-01-28
  • 2021-09-04
猜你喜欢
  • 2021-07-27
  • 2021-12-22
  • 2021-06-24
  • 2021-10-08
  • 2021-12-17
  • 2018-04-15
  • 2021-09-23
相关资源
相似解决方案