Created
March 21, 2018 12:23
-
-
Save poonai/c3eaae951d71df42fbc2f28c4de0b69c to your computer and use it in GitHub Desktop.
local kubernetes cluster to test the changes
This file contains 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
sudo su - | |
apt-get install -y gcc make socat git | |
# Install etcd | |
curl -L https://github.com/coreos/etcd/releases/download/v3.0.17/etcd-v3.0.17-linux-amd64.tar.gz -o etcd-v3.0.17-linux-amd64.tar.gz && tar xzvf etcd-v3.0.17-linux-amd64.tar.gz && /bin/cp -f etcd-v3.0.17-linux-amd64/{etcd,etcdctl} /usr/bin && rm -rf etcd-v3.0.17-linux-amd64* | |
#Install go | |
sudo curl -O https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz | |
sudo tar -xvf go1.9.1.linux-amd64.tar.gz | |
sudo mv go /usr/local | |
# Add it to your PATH | |
export GOPATH=/gopath | |
export PATH=$PATH:$GOPATH/bin:/usr/local/bin:/usr/local/go/bin/ | |
# Get kubernetes source code | |
git clone --depth 1 https://github.com/kubernetes/kubernetes | |
: | |
# Add kubernetes source code to GOPATH | |
git clone https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes | |
cd $GOPATH/src/k8s.io/kubernetes | |
#add your remote and pull code | |
git remote add schoolboy https://github.com/sch00lb0y/kubernetes | |
git fetch schoolboy | |
# Compile and run kubernetes (will take some time) | |
export KUBERNETES_PROVIDER=local | |
# test the cluster | |
#hack/local-up-cluster.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
detailed blog: https://dzone.com/articles/easy-step-by-step-local-kubernetes-source-code-cha