- Configure
kubelet, which is the main Kubernetes agent running in a worker node.- It takes Pod definitions and ensures that the containers are running and healthy.
kubeletis confgured in a stand-alone mode, which monitors a given folder for Pod definitions.- Check the supplied arguments in the
kubelet.servicefile.
- Check the supplied arguments in the
- Start the VM and wait for the configuration. It will take a while.
vagrant up - SSH into the machine.
vagrant ssh - Check that no containers are running on Docker.
docker ps -a - Copy the test pod definition into the
manifestsfolder - watched by Kubelet - and check that the containers are created. It may take a while due to image downloads.- In addition to the two containers in the Pod definition, a third container is created by
kubelet. This is an infrastructure container that allows that all containers in the Pod can be accessed using the same IP address.
cp pod.yaml manifests docker ps - In addition to the two containers in the Pod definition, a third container is created by
- Get the IP of the Pod - actually the IP of the infrastructure container created by Kubelet - and check that it is responding.
POD_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' `docker ps -q -f name=POD`) echo $POD_IP curl $POD_IP - Remove the test pod definition and check that containers are removed. It may take a bit.
rm manifests/pod.yaml docker ps - Close the SSH connection and destroy the VM
logout vagrant destroy -f