Last active
July 29, 2019 13:23
-
-
Save zedtux/681d2958f5bee3de6e7f691cd2786e81 to your computer and use it in GitHub Desktop.
An extracted part of a Chef recipe to deploy Kubernetes with Kubeadm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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