Skip to content

Instantly share code, notes, and snippets.

@poonai
Created March 21, 2018 12:23
Show Gist options
  • Save poonai/c3eaae951d71df42fbc2f28c4de0b69c to your computer and use it in GitHub Desktop.
Save poonai/c3eaae951d71df42fbc2f28c4de0b69c to your computer and use it in GitHub Desktop.
local kubernetes cluster to test the changes
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
@poonai
Copy link
Author

poonai commented Mar 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment