Skip to content

Instantly share code, notes, and snippets.

@salqadri
Last active April 1, 2019 18:06
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 salqadri/dcf5ee5c76e4a838b8bd2441da20f084 to your computer and use it in GitHub Desktop.
Save salqadri/dcf5ee5c76e4a838b8bd2441da20f084 to your computer and use it in GitHub Desktop.
# Make sure you are NOT root for these commands! But it must be a sudoer user.
# Open the ports you need to expose outside the node
#sudo firewall-cmd --zone=public --add-port=6443/tcp --permanent # Kubernetes API server
#sudo firewall-cmd --zone=public --add-port=2379-2380/tcp --permanent # etcd server client API
#sudo firewall-cmd --zone=public --add-port=10250/tcp --permanent # Kubelet API
#sudo firewall-cmd --zone=public --add-port=10251/tcp --permanent # kube-scheduler
#sudo firewall-cmd --zone=public --add-port=10252/tcp --permanent # kube-controller-manager
#sudo firewall-cmd --reload
# For sanity, just disable the entire firewall until you've figured out exactly what services you'll want to install.
systemctl disable firewalld --now # Disable the firewall
# Start kubeadm
sudo kubeadm init --pod-network-cidr=192.168.0.0/16
###### NOTE THE OUTPUT: It has the token you need to add workers!!! ######
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment