You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
599 B

  1. #!/bin/bash
  2. {{ docker_bin_dir }}/docker run --privileged \
  3. --net=host --pid=host --name=kubelet --restart=on-failure:5 \
  4. -v /etc/cni:/etc/cni:ro \
  5. -v /opt/cni:/opt/cni:ro \
  6. -v {{kube_config_dir}}:{{kube_config_dir}} \
  7. -v /sys:/sys \
  8. -v /dev:/dev \
  9. -v {{ docker_daemon_graph }}:/var/lib/docker \
  10. -v /var/run:/var/run \
  11. -v /var/lib/kubelet:/var/lib/kubelet \
  12. --memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} --cpu-shares={{ kubelet_cpu_limit|regex_replace('m', '') }} \
  13. {{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
  14. nsenter --target=1 --mount --wd=. -- \
  15. ./hyperkube kubelet \
  16. $@