Skip to content

Instantly share code, notes, and snippets.

@zedtux
Last active July 29, 2019 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zedtux/681d2958f5bee3de6e7f691cd2786e81 to your computer and use it in GitHub Desktop.
Save zedtux/681d2958f5bee3de6e7f691cd2786e81 to your computer and use it in GitHub Desktop.
An extracted part of a Chef recipe to deploy Kubernetes with Kubeadm
execute 'kubeadm init' do
command = <<-CMD
kubeadm init \
--token=#{node['kubeadm']['token']} \
--pod-network-cidr=#{node['kubeadm']['pod_cidr']} \
--service-cidr=#{node['kubeadm']['service_cidr']} \
--service-dns-domain=#{node['kubeadm']['dns_domain']} \
--apiserver-advertise-address=#{node['kubeadm']['api_ip_address']}
CMD
action :run
not_if "grep 'https://#{node['kubeadm']['api_ip_address']}' /etc/kubernetes/kubelet.conf"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment