forked from janakiramm/do-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.sh
More file actions
25 lines (16 loc) · 685 Bytes
/
node.sh
File metadata and controls
25 lines (16 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# Replace this with the token
TOKEN=xxxxxx.yyyyyyyyyyyyyyyy
MASTER_IP=xxx.xxx.xxx.xxx
apt-get update && apt-get upgrade -y
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update -y
apt-get install -y docker.io
apt-get install -y --allow-unauthenticated kubelet kubeadm kubectl kubernetes-cni
kubeadm join --token $TOKEN $MASTER_IP:6443 --discovery-token-unsafe-skip-ca-verification
# Install DigitalOcean monitoring agent
curl -sSL https://agent.digitalocean.com/install.sh | sh