Skip to content

Instantly share code, notes, and snippets.

@alexcmd
Last active February 21, 2022 11:03
Show Gist options
  • Select an option

  • Save alexcmd/255ccfb67054e5ba4d3fb51dc34bd675 to your computer and use it in GitHub Desktop.

Select an option

Save alexcmd/255ccfb67054e5ba4d3fb51dc34bd675 to your computer and use it in GitHub Desktop.

Revisions

  1. alexcmd revised this gist Feb 21, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions kube_master_setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12
    kubectl taint nodes --all node-role.kubernetes.io/master-
    mkdir -p $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
  2. alexcmd renamed this gist Dec 23, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. alexcmd created this gist Dec 23, 2019.
    12 changes: 12 additions & 0 deletions kube_master_setup
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12
    mkdir -p $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
    kubectl get ds/kube-proxy -o go-template='{{.spec.updateStrategy.type}}{{"\n"}}' --namespace=kube-system
    wget https://raw.githubusercontent.com/Microsoft/SDN/master/Kubernetes/flannel/l2bridge/manifests/node-selector-patch.yml
    kubectl patch ds/kube-proxy --patch "$(cat node-selector-patch.yml)" -n=kube-system
    wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
    kubectl apply -f kube-flannel.yml
    kubectl patch ds/kube-flannel-ds-amd64 --patch "$(cat node-selector-patch.yml)" -n=kube-system
    kubectl get pods --all-namespaces
    kubectl get ds -n kube-system