Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Last active November 29, 2016 06:55
Show Gist options
  • Save elsonrodriguez/941ed6feff267983580ea4f0634c12a2 to your computer and use it in GitHub Desktop.
Save elsonrodriguez/941ed6feff267983580ea4f0634c12a2 to your computer and use it in GitHub Desktop.
Quick and Dirty Single Node Kubernetes

Quick and Dirty Single Node Kubernetes Setup.

Preq-reqs:

  • You need a node
  • Your node's OS should be Linux
  • It should be a good Linux distro (Ubuntu 15.10)
  • Not a bad one
  • It should have Docker running
  • It should be disposable
  • It shouldn't have been previously traumatized
Create a working directory.
mkdir ~/kube-single
Grab releases of etcd and kubernetes
curl -L -O https://github.com/coreos/etcd/releases/download/v2.2.5/etcd-v2.2.5-linux-amd64.tar.gz
curl -L -O https://github.com/kubernetes/kubernetes/releases/download/v1.2.0/kubernetes.tar.gz
Decompress all the things.
tar -zxvf etcd-v2.2.5-linux-amd64.tar.gz
tar -zxvf kubernetes.tar.gz
tar -zxvf kubernetes/server/kubernetes-server-linux-amd64.tar.gz 
Copy these binaries you downloaded from the Internet into your path.
mkdir -p /opt/bin
cd ~/kube-single
cp etcd-v2.2.5-linux-amd64/etcd /opt/bin/
cp kubernetes/server/bin/!(*.*) /opt/bin
cp kubernetes/platforms/linux/amd64/kubectl /opt/bin
export PATH=$PATH:/opt/bin
What are you doing with stuff in your path that isn't executable?
chmod +x /opt/bin/*
Start all the things.
etcd &
kube-apiserver --service-cluster-ip-range=10.100.0.0/16 --etcd-servers=http://127.0.0.1:2379 &
kube-controller-manager --master=http://127.0.0.1:8080 &
kube-scheduler &
kube-proxy &
kubelet --api-servers=http://127.0.0.1:8080 &
That's a lot of spam. Open a new terminal and type this.
kubectl get all

Awwww Yissss.

kubectl run -i --tty busybox --image=busybox --restart=Never

[YISSING INTENSIFIES]

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