Overview

CLI command

add-kubernetes-host

DescriptionAdd a host (slave) to an existing Kubernetes-CoreOS Cluster.
Command format

add-kubernetes-host -p <JSON_FILE_PATH> -c <CLUSTER_ID>

The path to the JSON file that defines the Kubernetes-CoreOS host needs to be defined as the <JSON_FILE_PATH> value.

Parameter definitions

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-idID of the Kubernetes-CoreOS Cluster.Yeskubernetes-cluster-ec2

Sample Kubernetes-CoreOS host JSON

{
  "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.

Example

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.json directory. Thereafter, add the host to the Kubernetes-CoreOS Cluster.

add-kubernetes-host -p <STRATOS_SOURCE_HOME>/samples/kubernetes-clusters/kubernetes-host.json -c kubernetes-cluster-ec2

Sample output

You have successfully deployed host to Kubernetes cluster: kubernetes-cluster-ec2
  • No labels