Skip to content

Instantly share code, notes, and snippets.

@aaron-prindle
Created February 7, 2017 22:03
Show Gist options
  • Save aaron-prindle/a97148667114acc4664de63ff176ceb5 to your computer and use it in GitHub Desktop.
Save aaron-prindle/a97148667114acc4664de63ff176ceb5 to your computer and use it in GitHub Desktop.
$ mkdir ~/localkube-container
$ cd ~/localkube-container
# create Dockerfile from https://gist.github.com/aaron-prindle/b5d228c08c5a7db25be17c4871b99305 in directory
$ docker build -t localkube-container:v1 .
$ docker run --name minikube -it --volume=/:/rootfs:ro --volume=/sys:/sys:rw --volume=/var/lib/docker:/var/lib/docker:rw --volume=/var/lib/kubelet:/var/lib/kubelet:rw --volume=/var/run:/var/run:rw --net=host --pid=host --privileged localkube-container:v1 /bin/bash
# This will put you into the container, then you will run localkube
$ root@aprindle:/# ./localkube --apiserver-insecure-address=0.0.0.0 --apiserver-insecure-port=8080 --logtostderr=true --containerized
$ Using these existing CA certs: /var/lib/localkube/certs/ca.crt /var/lib/localkube/certs/ca.key
$ Using these existing certs: /var/lib/localkube/certs/apiserver.crt /var/lib/localkube/certs/apiserver.key
@aaron-prindle
Copy link
Author

aaron-prindle commented Feb 7, 2017

do this before the docker build step:
$ curl -O https://storage.googleapis.com/minikube/k8sReleases/v1.5.2/localkube-linux-amd64
$ mv localkube-linux-amd64 localkube

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