CLI command |
|
Description | Add a host (slave) to an existing Kubernetes-CoreOS Cluster. |
Command format |
The path to the JSON file that defines the Kubernetes-CoreOS host needs to be defined as the |
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
-p | --resource-path | Folder path where the JSON file that defines the Kubernetes-CoreOS host is stored. | Yes | <STRATOS_SOURCE_HOME>/samples/kubernetes-clusters/ kubernetes-host.json |
-c | --cluster-id | ID of the Kubernetes-CoreOS Cluster. | Yes | kubernetes-cluster-ec2 |
{ "hostId": "minion-2", "hostname": "minion-2.dev.kubernetes.org", "privateIPAddress": "172.17.8.103", "publicIPAddress": "172.17.8.103", "property": [ ] }
For information on all the properties that can be used in a Kubernetes Host definition, see the Kubernetes Host Resource Definition.
Use case: Define the Kubernetes-CoreOS host information in a JSON file, which is stored in the <STRATOS_SOURCE_HOME>/samples/kubernetes-clusters/kubernetes-host
directory. Thereafter, add the host to the Kubernetes-CoreOS Cluster..json
add-kubernetes-host -p <STRATOS_SOURCE_HOME>/samples/kubernetes-clusters/kubernetes-host.json -c kubernetes-cluster-ec2
You have successfully deployed host to Kubernetes cluster: kubernetes-cluster-ec2