GithubHelp home page GithubHelp logo

ptzagk / kube-solo-osx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thenewnormal/kube-solo-osx

0.0 0.0 0.0 850.18 MB

Kubernetes Solo Cluster for OS X

License: Apache License 2.0

Objective-C 33.06% Shell 66.94%

kube-solo-osx's Introduction

Kubernetes Solo cluster for OS X

k8s-solo

Zero to Kubernetes development environment

Kube-Solo for Mac OS X is a Mac Status bar App which works like a wrapper around the corectl command line tool (it makes easier to control xhyve based VMs) and bootstraps Kubernetes on a standalone CoreOS VM machine.

Also there is Kube-Cluster for OS X App (master + 2 nodes)

Includes: Helm - The Kubernetes Package Manager

Includes: An option from shell to install Deis Workflow on top of Kubernetes with a simple: $ install_deis

Kube-Solo App can be used together with CoreOS VM App which allows to build Docker containers and has a private local Docker registry v2 which is accessible from Kube-Solo App.

Kube-Solo

Download

Head over to the Releases Page to grab the latest release.

How to install Kube-Solo

Requirements

  • OS X 10.10.3 Yosemite or later
  • Mac 2010 or later for this to work.
  • Note: For the fresh App install it is recommended to restart your Mac if you have used VirtualBox based VM, as the VirtualBox sometimes messes networking up.

###Install:

Open downloaded dmg file and drag the App e.g. to your Desktop. Start the Kube-Solo App and Initial setup of Kube-Solo VM will run.

  • All dependent files/folders will be put under kube-solo folder in the user's home folder e.g /Users/someuser/kube-solo.
  • User's Mac password will be stored in OS X Keychain, it will be used to pass to sudo command which needs to be used starting the VM, this allows to avoid using sudo for corectl to start a VM.
  • ISO images are stored under ~/.coreos/images. That allows to share the same images between different corectl based Apps
  • user-data file will have fleet and etcd enabled
  • Will download latest CoreOS ISO image and run corectl to initialise VM
  • When you first time do install or 'Up' after destroying Kube-Solo setup, k8s binary files (with the version which was available when the App was built) get copied to CoreOS VM, this speeds up Kubernetes setup. To update Kubernetes just run from menu 'Updates' - Update Kubernetes to latest stable version.
  • It will install fleetctl, etcdctl and kubectl to ~/kube-solo/bin/
  • Kubernetes services will be installed with fleet units which are placed in ~/kube-solo/fleet, this allows very easy updates to fleet units if needed.
  • Fleet-UI via unit file will be installed to check running fleet units
  • Kubernetes Dashboard will be instlled as an add-on
  • Also DNS addon will be installed
  • Via assigned static IP (it will be shown in first boot and will survive VM's reboots) you can access any port on CoreOS VM
  • Persistent disk data.img will be created and mounted to /data for these mount binds:
/data/var/lib/docker -> /var/lib/docker
/data/var/lib/rkt -> /var/lib/rkt
/data/var/lib/etcd2 -> /var/lib/etcd2
/data/opt/bin -> /opt/bin

How it works

Just start Kube-Solo application and you will find a small icon of Kubernetes logo with S in the Status Bar.

  • There you can Up, Halt, Reload CoreOS VM + Kubernetes Cluster
  • SSH to k8solo-01 will open VM shell
  • Under Up OS Shell will be opened when VM boot finishes up and it will have such environment pre-set:
1) kubernetes master - export KUBERNETES_MASTER=http://192.168.64.xxx:8080
2) etcd endpoint - export ETCDCTL_PEERS=http://192.168.64.xxx:2379
3) fleetctl endpoint - export FLEETCTL_ENDPOINT=http://192.168.64.xxx:2379
4) fleetctl driver - export FLEETCTL_DRIVER=etcd
5) Path to ~/kube-solo/bin where etcdctl, fleetctl and kubernetes binaries are stored
  • Fleet-UI dashboard will show running fleet units and etc
  • Kubernetes Dashboard will show nice Kubernetes Dashboard, where you can check Nodes, Pods, Replication and Service Controllers, deploy Apps and etc.
  • k8solo-01 cAdvisor will open cAdvisor URL in default browser
  • Updates/Update Kubernetes to the latest version will update to latest version of Kubernetes.
  • Updates/Change Kubernetes version will download and install specified Kubernetes version from GitHub.
  • Updates/Update OS X fleetctl and helm clients will update fleetctl to the same versions as CoreOS VM runs and helm to the latest version.
  • Updates/Fetch latest CoreOS ISO will download latest ISO file of CoreOS VM.

Example ouput of succesfull CoreOS + Kubernetes Solo install:

etcd cluster:192.168.64.2
/coreos.com
/registry

fleetctl list-machines:
MACHINE		IP		METADATA
c576b883...	192.168.64.2	role=kube

fleetctl list-units:
UNIT									MACHINE				ACTIVE	SUB
fleet-ui.service				c576b883.../192.168.64.2	active	running
kube-apiserver.service			c576b883.../192.168.64.2	active	running
kube-controller-manager.service	c576b883.../192.168.64.2	active	running
kube-kubelet.service			c576b883.../192.168.64.2	active	running
kube-proxy.service				c576b883.../192.168.64.2	active	running
kube-scheduler.service			c576b883.../192.168.64.2	active	running

kubectl get nodes:
NAME           LABELS         STATUS
192.168.64.2   node=worker1   Ready

Usage

You're now ready to use Kubernetes cluster.

Some examples to start with Kubernetes examples.

Other links

kube-solo-osx's People

Contributors

rimusz avatar interstateone avatar adamreese avatar bfarias-godaddy avatar whitlockjc avatar jgmize avatar chrislovecnm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.