Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 867 Bytes

install-and-configure-kubelet.md

File metadata and controls

47 lines (35 loc) · 867 Bytes

Install and configure the Kubelet

node1

gcloud compute ssh node1

Download Kubernetes release tar

See the Download a Kubernetes release lab.

Create the kubelet systemd unit file:

sudo sh -c 'echo "[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.service
Requires=docker.service

[Service]
ExecStart=/usr/local/bin/hyperkube \
  kubelet \
  --api-servers=http://node0:8080 \
  --allow-privileged=true
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target" > /etc/systemd/system/kubelet.service'

Start the kubelet service:

sudo systemctl daemon-reload
sudo systemctl enable kubelet
sudo systemctl start kubelet

Verify

sudo systemctl status kubelet
kubectl --server http://node0:8080 get nodes