Start a new Kubernetes cluster using the following command, which will start one master node and one minion:
Code Block
run.sh
If more than one minion is needed, run the following command with the required number of instances. The number of instances you require is defined by n.
Code Block
run.sh NUM_INSTANCES=2
If you need to specify the minion's memory and CPU, use the following command: Example:
Code Block
run.sh NUM_INSTANCES=2 NODE_MEM=4096 NODE_CPUS=2
Once the nodes are connected to the cluster and the state of the nodes are changed to Ready, the Kubernetes cluster is ready for use. Execute the following Kubernetes CLI commands and verify the cluster status:
Code Block
kubectl get nodes
NAME LABELS STATUS
172.17.8.102 kubernetes.io/hostname=172.17.8.102 Ready
Info
Access the Kubernetes UI using the following URL http://<HOST>:<HTTP_PORT>/ui
If you get a notification mentioning that the \"kube-ui\" endpoints cannot be found, execute the kube-ui-pod.sh script.
Localtab
title
Kubernetes on EC2
Follow the instructions below to create an elastic Kubernetes cluster with three worker nodes and a master on a Mac Operating System, which is running in EC2:
Info
The Kubernetes cluster will also include the following sections:
Replace the <ami_image_id> with a suitable version of the CoreOS image for AWS. It is recommend to use the following CoreOS alpha channel AMI Image ID: ami-f7a5fec7
Once the worker instances are fully booted, the kube-register service running on the master node will automatically register the Kubernetes API server. This process will take several minutes.