You can get details of the master in a Kubernetes-CoreOS cluster using the CLI tool or REST API, as shown below:
Getting details of the Master in a Kubernetes-CoreOS Group via the CLI
Overview
CLI command |
|
Description | Retrieve details of the master in a Kubernetes-CoreOS Cluster. |
Command format | describe-kubernetes-master <CLUSTER_ID> |
Parameter definition
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
N/A | N/A | The ID of the Kubernetes Cluster | Yes | kubernetes-cluster-1 |
Example
Retrieving the details on the master in a Kubernetes-CoreOS Cluster with the id: kubernetes-cluster-1
.
describe-kubernetes-master kubernetes-cluster-1
Sample output
Cluster: kubernetes-cluster-1 { "hostId": "master", "hostname": "master.dev.kubernetes.org", "privateIPAddress": "172.17.8.101", "publicIPAddress": "172.17.8.101" }
Getting details of the Master in a Kubernetes-CoreOS Group via the REST API
Overview
Description | Retrieve detailed information on the master node in a specific Kubernetes-CoreOS group. |
Resource Path | /kubernetesClusters/{kubernetesClusterId}/master |
HTTP Method | GET |
Request/Response Format | application/json |
Command format | curl -X GET -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>/api/kubernetesClusters/{kubernetesClusterId}/master
|
Example
Retrieving the details on the master in a Kubernetes-CoreOS Cluster with the id: kubernetes-cluster-1
.
curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/kubernetesClusters/kubernetes-cluster-1/master
Sample output
> GET /api/kubernetesClusters/kubernetes-cluster-1/master HTTP/1.1 > Host: localhost:9443 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > < HTTP/1.1 200 OK < Date: Thu, 01 Oct 2015 09:32:46 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < {"hostId":"master","hostname":"master.dev.kubernetes.org","privateIPAddress":"172.17.8.101","publicIPAddress":"172.17.8.101"}
Following are the HTTP status codes you will come across while retrieving details of a master node in a Kubernetes-CoreOS group:
HTTP status code | 200, 404, 500 See the descriptions of the HTTP status codes here. |
Overview
Content Tools
Activity