sebgoa sebgoa on Products, kmachine

kmachine

kmachine is a Kubernetes tool that helps developers create a standalone single node Kubernetes instance in public clouds.

It is open source and licensed with ASL v2.

It is extremely useful as a development and training tool. Similar to Docker-machine it creates a cloud instance and provisions it automatically with Docker and Kubernetes.

Its design is comparable to minikube but provides the additional functionalities of creating an instance in the Cloud to benefit from higher bandwidth and avoiding to consume local resources on your machine.

Usage is straightforward and resembles Docker-machine usage:

$ kmachine create -d exoscale skippbox
Running pre-create checks...  
Creating machine...  
Waiting for machine to be running, this may take a few minutes...  
Machine is running, waiting for SSH to be available...  
Detecting operating system of created instance...  
Provisioning created instance...  
Copying certs to the local machine directory...  
Copying certs to the remote machine...  
Setting Docker configuration on the remote daemon...  
Configuring kubernetes...  
Copying certs to the remote system...  
To see how to connect Docker to this machine, run: kmachine env skippbox  

When setting up the environment a kubectl context will be created automatically for you. You will be able to use the Kubernetes API seamlessly as well as connect to the cloud instance.

$ kmachine ssh skippbox
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-57-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sat Nov  7 11:08:54 EST 2015

  System load:  0.86              Processes:              72
  Usage of /:   9.2% of 19.56GB   Users logged in:        0
  Memory usage: 18%               IP address for eth0:    159.203.140.251
  Swap usage:   0%                IP address for docker0: 172.17.0.1

  Graph this data and manage this system at:
    https://landscape.canonical.com/

root@skippbox:~# docker ps  
CONTAINER ID        IMAGE                                       COMMAND                  CREATED             STATUS              PORTS               NAMES  
3ed51c981f54        gcr.io/google_containers/hyperkube:v1.0.3   "/hyperkube scheduler"   22 minutes ago      Up 22 minutes                           k8s_scheduler.6346e99c_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_35e95afb  
305cb84717c8        gcr.io/google_containers/hyperkube:v1.0.3   "/hyperkube proxy --m"   22 minutes ago      Up 22 minutes                           k8s_proxy.7d0a1297_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_0d5cb791  
6b23bfaee4b8        gcr.io/google_containers/hyperkube:v1.0.3   "/hyperkube apiserver"   22 minutes ago      Up 22 minutes                           k8s_apiserver.f4a937b5_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_71cab2d1  
f45185c25100        gcr.io/google_containers/hyperkube:v1.0.3   "/hyperkube controlle"   22 minutes ago      Up 22 minutes                           k8s_controller-manager.7a35f0b6_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_40b06c2e  
94c9bff59658        b.gcr.io/kuar/etcd:2.1.1                    "/etcd --data-dir=/va"   22 minutes ago      Up 22 minutes                           k8s_etcd.92bf0224_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_81ff2e71  
c626b5467b14        gcr.io/google_containers/pause:0.8.0        "/pause"                 22 minutes ago      Up 22 minutes                           k8s_POD.e4cc795_kubernetes123-127.0.0.1_default_6fde80142812f40cf848367ebaeef544_5079623e  
8b7eee9ead53        gcr.io/google_containers/hyperkube:v1.0.3   "/hyperkube kubelet -"   22 minutes ago      Up 22 minutes                           master  
root@skippbox:~#