How Do You Get Kubernetes to Work as a Test Instance?

Problem scenario
You want to set up Kubernetes on a server as quickly as possible as a proof-of-concept.  You want to create pods without the best practice security mechanisms because you are behind a firewall and in a development environment.  How do you quickly install and configure Kubernetes as a development deployment on a single host server?

1.  Install and configure kubelet, kubeadm, kubectl, etcd, kube-proxy, kube-controller-manager, and kube-scheduler.  To do these things on Ubuntu see this link for the first four and this link for the last three.

2.  Run these six commands:

cd ~
mkdir etcd-data
docker run --volume=$PWD/etcd-data:/default.etcd --detach --net=host > etcd-container-id
sudo wget
sudo chmod +x kube-apiserver
sudo kube-apiserver --etcd-servers= --service-cluster-ip-range= --secure-port=0

3.  Create or open a duplicate terminal session.  Run your kubectl commands as you please.

Leave a comment

Your email address will not be published. Required fields are marked *