This documentation is for WSO2 Private PaaS 4.1.0. View documentation for the latest release.
Getting Details of the Master in a Kubernetes-CoreOS Cluster - WSO2 Private PaaS 4.1.0 - WSO2 Documentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
||
Skip to end of metadata
Go to start of metadata

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

describe-kubernetes-master

DescriptionRetrieve details of the master in a Kubernetes-CoreOS Cluster.
Command format
describe-kubernetes-master <CLUSTER_ID>
Parameter definition
Short optionLong optionDescriptionRequiredExample value
N/AN/AThe ID of the Kubernetes ClusterYeskubernetes-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
DescriptionRetrieve detailed information on the master node in a specific Kubernetes-CoreOS group.
Resource Path/kubernetesClusters/{kubernetesClusterId}/master
HTTP MethodGET
Request/Response Formatapplication/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
  • By default, <USERNAME>:<PASSWORD> is admin:admin.
  • By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
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.

  • No labels