Skip to content

Commit

Permalink
Merge pull request #101 from neelimamukiri/k8s_path
Browse files Browse the repository at this point in the history
Fix k8s paths for uninstall & README
  • Loading branch information
neelimamukiri authored Apr 10, 2017
2 parents 7ac5986 + f0bfd3d commit 4c50e11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you need to remove Contiv from Docker Swarm and return to your original state
* Install Kubernetes 1.4:
1. Contiv service-cidr is currently 10.254.0.0/16. `kubeadm init` step needs to be called with the `--service-cidr 10.254.0.0/16` parameter.
2. kubeadm installs the latest Kubernetes version. To install the latest supported version use the `--use-kubernetes-version v1.4.7` parameter.<br>
See an example script [here.](https://github.com/contiv/install/blob/master/cluster/k8s1.4/k8smaster_centos.sh)
See an example script [here.](https://github.com/contiv/install/blob/master/cluster/k8s1.4/k8smaster.sh)
3. Replace step (3/4) in the kubeadm install guide with the following Contiv Installation Instructions. Contiv installation can be done after completing step (4/4).
4. Instructions to install Kubernetes 1.4 are available [here.](http://kubernetes.io/docs/getting-started-guides/kubeadm/)
5. **NOTE:** A recent kubeadm update has rendered the latest kubeadm unable to install Kubernetes 1.4. To workaround this issue, please use kubeadm version 1.6.0-0.alpha or earlier.
Expand Down
11 changes: 9 additions & 2 deletions install/k8s/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ if [ $EUID -ne 0 ]; then
exit 1
fi

kubectl="kubectl --kubeconfig /etc/kubernetes/admin.conf"
k8sversion=$($kubectl version --short | grep "Server Version")
if [[ "$k8sversion" == *"v1.4"* ]] || [[ "$k8sversion" == *"v1.5"* ]]; then
k8sfolder="k8s1.4"
else
k8sfolder="k8s1.6"
fi
if [ "$#" -eq 1 ] && [ "$1" = "-h" ]; then
echo "Usage: ./install/k8s/uninstall.sh to uninstall contiv"
echo " ./install/k8s/uninstall.sh etcd-cleanup to uninstall contiv and cleanup contiv data"
Expand All @@ -21,9 +28,9 @@ if [ "$#" -eq 1 ] && [ "$1" = "etcd-cleanup" ]; then
rm -rf /var/etcd/contiv-data
fi

kubectl create -f install/k8s/cleanup.yaml
kubectl create -f install/k8s/$k8sfolder/cleanup.yaml
sleep 60
kubectl delete -f install/k8s/cleanup.yaml
kubectl delete -f install/k8s/$k8sfolder/cleanup.yaml

# Re-creating the kube-dns deployment
kubectl create -f kube-dns.yaml

0 comments on commit 4c50e11

Please sign in to comment.