摘要:收集整理一些可能较常用的,结合的自动化系统以及监控可能会用到。注涉及到方法中的为发送的数据体。注意删除,对应的并不会级联删除,需要在手动调用删除对应的略不爽
收集整理一些可能较常用的api,结合kubernetes的自动化系统 以及 监控可能会用到。
注:涉及到POST方法中的json为发送的数据体。
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/nodesget namespace
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/namespacescreate namespace
curl -i -k -X POST https://10.10.5.103:6443/api/v1beta3/namespaces -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -d "$(cat namespace-production.json)" { "apiVersion": "v1", "kind": "Namespace", "metadata": { "labels": { "name": "production" }, "name": "production" } }create a pod
curl -i -k -X POST https://10.10.5.103:6443/api/v1beta3/namespaces/development/pods -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -d "$(cat pod-8xxxxxxcom.json) { "kind": "Pod", "apiVersion": "v1beta3", "metadata": { "name": "8xxxxxx", "labels": { "name": "8xxxxxx" } }, "spec":{ "volumes":[ { "name":"log-vol", "hostPath":{ "path":"/home/work/data/8_xxxxxx_com" } }, { "name":"localtime", "hostPath":{ "path":"/etc/localtime" } } ], "containers":[ { "name":"8-xxxxxx-com", "image":"docker-registry.xxxxxx.com:5000/xxxxxx/8_xxxxxx_com:20150612", "ports":[ { "name":"ssh-port", "containerPort":22, "protocol":"TCP" }, { "name":"http-port", "containerPort":8008, "protocol":"TCP" } ], "volumeMounts":[ { "mountPath":"/home/work/var/nfs", "readOnly":false, "name":"log-vol" }, { "mountPath":"/etc/localtime", "readOnly":true, "name":"localtime" } ], "imagePullPolicy": "Always" } ] } }get a pod:
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/pods curl http://10.10.5.103:7080/api/v1beta3/namespaces/development/pods?labelSelector=name%3D8.xxxxxx.comdelete a pod:
curl -X DELETE http://10.10.5.103:18080/api/v1beta3/namespaces/development/pods/8xxxxxxcreate a replication controller:
curl -i -k -X POST https://10.10.5.103:6443/api/v1beta3/namespaces/development/replicationcontrollers -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -d "$(cat rc-8_xxxxxx_com.json)" { "kind":"ReplicationController", "apiVersion":"v1beta3", "id":"8.xxxxxx.com", "metadata":{ "name":"8.xxxxxx.com", "labels":{ "name":"8.xxxxxx.com" } }, "spec":{ "replicas":3, "selector":{ "name":"8.xxxxxx.com" }, "template":{ "metadata":{ "labels":{ "name":"8.xxxxxx.com" } }, "spec":{ "volumes":[ { "name":"log-vol", "hostPath":{ "path":"/home/work/data/8_xxxxxx_com" } }, { "name":"localtime", "hostPath":{ "path":"/etc/localtime" } } ], "containers":[ { "name":"8-xxxxxx-com", "image":"docker-registry.xxxxxx.com:5000/xxxxxx/8_xxxxxx_com:20150612", "ports":[ { "name":"ssh-port", "containerPort":22, "protocol":"TCP" }, { "name":"http-port", "containerPort":8008, "protocol":"TCP" } ], "volumeMounts":[ { "mountPath":"/home/work/var/nfs", "readOnly":false, "name":"log-vol" }, { "mountPath":"/etc/localtime", "readOnly":true, "name":"localtime" } ], "imagePullPolicy": "Always" } ] } } } }get a replication controller:
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/namespaces/development/replicationcontrollers curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/namespaces/development/replicationcontrollers/8.xxxxxx.comdelete a replication controller
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X DELETE https://10.10.5.103:6443/api/v1beta3/namespaces/development/replicationcontrollers/8.xxxxxx.com
注意:删除replicationcontroller,对应的pod并不会级联删除,需要在手动调用pod delete删除对应的pod(略不爽~)
create a servicecurl -i -k -X POST https://10.10.5.103:6443/api/v1beta3/namespaces/development/services -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -d "$(cat svc-8xxxxxx.jso)" { "kind":"Service", "apiVersion":"v1beta3", "metadata":{ "name":"prometheus", "labels":{ "name":"prometheus" } }, "spec":{ "ports": [ { "port":8018, "targetPort":8008, "nodePort": 30061, "protocol":"TCP" }], "type":"NodePort", "selector":{ "name":"8.xxxxxx.com" } } }get a service
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/namespaces/development/services curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X GET https://10.10.5.103:6443/api/v1beta3/namespaces/development/services/prometheusdelete a service
curl -i -k -H "Authorization: Bearer lalalalalllaSDDDSASDASF=" -X DELETE https://10.10.5.103:6443/api/v1beta3/namespaces/development/services/prometheus
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/32436.html
摘要:与或等流行工具结合或集成在当今的混合云管理提供商中很常见。如果中止混合云管理合同,那么它只是策略的一部分,而加入现有资源则需要模板转换为混合云管理格式。实际上,组织不必选择最好的混合云管理产品。混合云管理(HCM)市场的发展如今有些停滞不前,但最近这一切发生了变化。很多企业开始解决云计算管理挑战,在采用云计算策略的企业中,超过一半的基础设施决策者正在积极监控使用情况,并创建有效的云计算策略。...
摘要:二月份,微软正式加入支持的行列,宣布容器服务支持。去年月,在亚马逊弹性容器服务首次亮相。是年的最后一次重大更新,于月日正式推出。值得注意的公告包括亚马逊网络服务于八月份以白金会员最高级别加入了。 2017年的云计算市场,有一个领域获得了空前的关注 -- Kubernetes。 Kubernetes可以追溯到2014年,当时Google公开发布了该项目的开源代码。2017年,Kubern...
摘要:二月份,微软正式加入支持的行列,宣布容器服务支持。去年月,在亚马逊弹性容器服务首次亮相。是年的最后一次重大更新,于月日正式推出。值得注意的公告包括亚马逊网络服务于八月份以白金会员最高级别加入了。 2017年的云计算市场,有一个领域获得了空前的关注 -- Kubernetes。 Kubernetes可以追溯到2014年,当时Google公开发布了该项目的开源代码。2017年,Kubern...
摘要:事实上,大多数企业会从两家或更多的服务商那里采购云服务,这一趋势将在年进一步流行起来,并将带动微软阿里巴巴谷歌和甲骨文的收入。云计算实际上已经成为了推动数字化转型和现代化IT组合的平台。越来越多的企业正通过租用亚马逊网络服务(AWS)、微软和谷歌等厂商提供的软件,享受由此带来的业务敏捷性或成本节约等优势。 事实上,大多数企业会从两家或更多的服务商那里采购云服务,这一趋势将在2019年进...
摘要:事实上,大多数企业会从两家或更多的服务商那里采购云服务,这一趋势将在年进一步流行起来,并将带动微软阿里巴巴谷歌和甲骨文的收入。 云计算实际上已经成为了推动数字化转型和现代化IT组合的平台。越来越多的企业正通过租用亚马逊网络服务(AWS)、微软和谷歌等厂商提供的软件,享受由此带来的业务敏捷性或成本节约等优势。事...
阅读 2242·2021-10-09 09:41
阅读 3341·2021-09-13 10:34
阅读 1896·2019-08-30 12:59
阅读 535·2019-08-29 17:27
阅读 1034·2019-08-29 16:07
阅读 2937·2019-08-29 13:15
阅读 1286·2019-08-29 13:14
阅读 1519·2019-08-26 12:18