Use the master.yaml and node.yaml cloud-configs to provision a multi-node Kubernetes cluster.
- Provision the master node
- Capture the master node private IP address
- Edit node.yaml
- Provision one or more worker nodes
aws ec2 create-security-group --group-name kubernetes --description "Kubernetes Security Group"
aws ec2 authorize-security-group-ingress --group-name kubernetes --protocol tcp --port 22 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-name kubernetes --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-name kubernetes --source-security-group-name kubernetes
aws ec2 run-instances \
--image-id ami-d92377e9 \
--key-name <keypair> \
--region us-west-2 \
--security-groups kubernetes \
--instance-type m3.medium \
--user-data file://master.yaml
aws ec2 describe-instances --instance-id <master-instance-id>
Edit node.yaml
and replace all instances of <master-private-ip>
with the private IP address of the master node.
aws ec2 run-instances \
--count 1 \
--image-id ami-d92377e9 \
--key-name <keypair> \
--region us-west-2 \
--security-groups kubernetes \
--instance-type m3.medium \
--user-data file://node.yaml
gcloud compute instances create master \
--image-project coreos-cloud \
--image coreos-alpha-509-1-0-v20141124 \
--boot-disk-size 200GB \
--machine-type n1-standard-1 \
--zone us-central1-a \
--metadata-from-file user-data=master.yaml
gcloud compute instances list
Edit node.yaml
and replace all instances of <master-private-ip>
with the private IP address of the master node.
gcloud compute instances create node1 \
--image-project coreos-cloud \
--image coreos-alpha-509-1-0-v20141124 \
--boot-disk-size 200GB \
--machine-type n1-standard-1 \
--zone us-central1-a \
--metadata-from-file user-data=node.yaml
mkdir -p /tmp/new-drive/openstack/latest/
cp master.yaml /tmp/new-drive/openstack/latest/user_data
hdiutil makehybrid -iso -joliet -joliet-volume-name "config-2" -joliet -o master.iso /tmp/new-drive
Boot the vmware image using master.iso
as a config drive.
Edit node.yaml
and replace all instances of <master-private-ip>
with the private IP address of the master node.
mkdir -p /tmp/new-drive/openstack/latest/
cp node.yaml /tmp/new-drive/openstack/latest/user_data
hdiutil makehybrid -iso -joliet -joliet-volume-name "config-2" -joliet -o node.iso /tmp/new-drive
Boot one or more the vmware image using node.iso
as a config drive.