http://10.175.172.157:50000/api/v1/namespaces/test/services
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "spacecrane1",
"namespace": "test",
"labels": {
"application-spacecrane": "spacecrane1"
}
},
"spec": {
"ports": [{
"protocol": "TCP",
"targetPort": 80,
"port":80
}],
"selector": {
"application-spacecrane": "spacecrane1"
},
"type": "NodePort",
"sessionAffinity": "None",
"externalTrafficPolicy": "Cluster"
},
"status": {
"loadBalancer": {
}
}
}
http://10.175.172.157:50000/apis/apps/v1beta1/namespaces/test/deployments/
{
"kind": "Deployment",
"apiVersion": "apps/v1beta1",
"metadata": {
"name": "hy3",
"namespace": "test",
"labels": {
"test-app": "hy3"
}
},
"spec": {
"replicas": 2,
"selector": {
"matchLabels": {
"test-app": "hy3"
}
},
"template": {
"metadata": {
"labels": {
"test-app": "hy3"
}
},
"spec": {
"containers": [{
"name": "hy3",
"image": "docker.io/dannadocker2017/spacecrane:v1.6",
"ports": [{
"containerPort": 8822,
"protocol": "TCP"
}]
}]
}
},
"revisionHistoryLimit": 10
}
}
网友评论