Skip to content

Commit

Permalink
Update aws-actuator README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
frobware committed Aug 24, 2018
1 parent bd9dc30 commit 5077a0f
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions cmd/aws-actuator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,33 @@ Machine delete operation was successful.
./bin/aws-actuator create -m examples/master-machine.yaml -c examples/cluster.yaml -u examples/master-userdata.yaml
```
By default networking is enabled on the master machine. You can
interact with the master by copying the kubeconfig and using
`kubectl`. You'll need to find the external IP address of your master
and then:

```sh
ssh [email protected] "sudo cat /etc/kubernetes/admin.conf" > kubeconfig
export KUBECONFIG=$PWD/kubeconfig
kubectl config set-cluster kubernetes --server=https://ec2-184-73-119-192.compute-1.amazonaws.com:8443
kubectl get nodes
NAME STATUS ROLES AGE VERSION
ip-172-31-34-42.ec2.internal Ready master 6m v1.11.2
```

2. Once the ip address of the master node is known (e.g. 172.31.34.2), update the `kubeadm join` line in `examples/worker-user-data.sh` to:
```sh
kubeadm join 172.31.34.2:8443 --token 2iqzqm.85bs0x6miyx1nm7l --discovery-token-unsafe-skip-ca-verification
```

You can get the internal IP address of the cluster dynamically by
running:

```sh
echo $(ssh [email protected] wget -qO - http://169.254.169.254/latest/meta-data/local-ipv4)
172.31.34.42
```

3. Encode the `examples/worker-user-data.sh` by running:

```sh
Expand All @@ -71,11 +93,3 @@ $ cat examples/worker-user-data.sh | base64

After some time the kubernetes cluster with the control plane (master node) and the worker node gets provisioned
and the worker joins the cluster.
The cluster does not have any network plugin installed. You can extend the `examples/master-user-data.sh` with:
```sh
kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml --kubeconfig /etc/kubernetes/admin.conf
```
and regenerate the `data.userData` of `examples/master-user-data.yaml`.

0 comments on commit 5077a0f

Please sign in to comment.