coreos/rktnetes-workshop

Name: rktnetes-workshop

Owner: CoreOS

Description: Vagrant up your rktnetes cluster

Forked from: s-urbaniak/rktnetes-workshop

Created: 2016-06-27 19:19:04.0

Updated: 2018-03-13 22:36:40.0

Pushed: 2016-10-20 16:00:48.0

Homepage:

Size: 2095

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

rktnetes-workshop

This repo contains a Vagrantfile and necessary assets to help you launch your Kubernetes cluster with rkt as a runtime.

Workshop

The workshop slides can be viewed at http://go-talks.appspot.com/github.com/coreos/rktnetes-workshop/workshop.slide.

Vagrant up your rktnetes cluster.
 vagrant
grant up
]

grant ssh

rant@localhost ~]$ kubectl describe node 127.0.0.1
:           127.0.0.1
ls:         beta.kubernetes.io/arch=amd64
        beta.kubernetes.io/os=linux
        kubernetes.io/hostname=127.0.0.1
ts:         <none>
tionTimestamp:  Mon, 27 Jun 2016 21:23:07 +0000
e:          
itions:
pe          Status  LastHeartbeatTime           LastTransitionTime          Reason              Message
--          ------  -----------------           ------------------          ------              -------
tOfDisk         False   Mon, 27 Jun 2016 21:25:10 +0000     Mon, 27 Jun 2016 21:23:07 +0000     KubeletHasSufficientDisk    kubelet has sufficient disk space available
moryPressure    False   Mon, 27 Jun 2016 21:25:10 +0000     Mon, 27 Jun 2016 21:23:07 +0000     KubeletHasSufficientMemory  kubelet has sufficient memory available
ady         True    Mon, 27 Jun 2016 21:25:10 +0000     Mon, 27 Jun 2016 21:23:07 +0000     KubeletReady            kubelet is posting ready status
esses:      127.0.0.1,127.0.0.1
city:
ha.kubernetes.io/nvidia-gpu:    0
:                   2
ory:                2048712Ki
s:                  110
catable:
ha.kubernetes.io/nvidia-gpu:    0
:                   2
ory:                2048712Ki
s:                  110
em Info:
hine ID:            508619e7e68e446c84d1fcdf7e0dc577
tem UUID:           B488DBD6-3470-4E69-BF62-DE81AD069083
t ID:           1ea277cf-87e2-4383-bbea-305339975de9
nel Version:        4.5.5-300.fc24.x86_64
Image:          Fedora 24 (Cloud Edition)
rating System:      linux
hitecture:          amd64
tainer Runtime Version: rkt://1.9.1
elet Version:       v1.3.0-beta.2
e-Proxy Version:        v1.3.0-beta.2
rnalID:         127.0.0.1
terminated Pods:        (0 in total)
mespace         Name        CPU Requests    CPU Limits  Memory Requests Memory Limits
-------         ----        ------------    ----------  --------------- -------------
cated resources:
otal limits may be over 100 percent, i.e., overcommitted. More info: http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md)
U Requests  CPU Limits  Memory Requests Memory Limits
----------  ----------  --------------- -------------
(0%)    0 (0%)      0 (0%)      0 (0%)
ts:
rstSeen LastSeen    Count   From            SubobjectPath   Type        Reason          Message
------- --------    -----   ----            -------------   --------    ------          -------
        2m      1   {kube-proxy 127.0.0.1}          Normal      Starting        Starting kube-proxy.
        2m      1   {kubelet 127.0.0.1}         Normal      Starting        Starting kubelet.
        2m      7   {kubelet 127.0.0.1}         Normal      NodeHasSufficientDisk   Node 127.0.0.1 status is now: NodeHasSufficientDisk
        2m      7   {kubelet 127.0.0.1}         Normal      NodeHasSufficientMemory Node 127.0.0.1 status is now: NodeHasSufficientMemory
        2m      1   {controllermanager }            Normal      RegisteredNode      Node 127.0.0.1 event: Registered Node 127.0.0.1 in NodeController

Now we can start playing with the rktnetes cluster!

rant@localhost ~]$ kubectl run redis --image=redis
oyment "redis" created

rant@localhost ~]$ kubectl get pods
                     READY     STATUS    RESTARTS   AGE
s-4282552436-bwue8   1/1       Running   0          13s

rant@localhost ~]$ rkt list
        APP     IMAGE NAME                  STATE   CREATED     STARTED     NETWORKS
7036    hyperkube   quay.io/coreos/hyperkube:v1.3.0-beta.2_coreos.0 running 14 minutes ago  14 minutes ago  
0e51    etcd        quay.io/coreos/etcd:v2.3.7          running 14 minutes ago  14 minutes ago  
96f0    hyperkube   quay.io/coreos/hyperkube:v1.3.0-beta.2_coreos.0 running 14 minutes ago  14 minutes ago  
bef9    hyperkube   quay.io/coreos/hyperkube:v1.3.0-beta.2_coreos.0 running 14 minutes ago  14 minutes ago  
7641    redis       registry-1.docker.io/library/redis:latest   running 1 minute ago    1 minute ago    rkt.kubernetes.io:ip4=10.1.0.2, default-restricted:ip4=172.16.28.2

Add the Kubernetes Dashboard:

rant@localhost ~]$ kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml

Add an Ingress controller based on traefik:

rant@localhost ~]$ kubectl create -f /vagrant/traefik.yaml

Modify your local /etc/hosts, replace the entry with the Vagrant IP address:

rant@localhost ~]$ ip addr show dev eth1
th1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:90:3f:9a brd ff:ff:ff:ff:ff:ff
inet 172.28.128.126/24 brd 172.28.128.255 scope global dynamic eth1
   valid_lft 3221sec preferred_lft 3221sec
inet6 fe80::5054:ff:fe90:3f9a/64 scope link 
   valid_lft forever preferred_lft forever

rant@localhost ~]$ exit

 /etc/hosts

28.128.126    traefik.rktnetes

Open http://traefik.rktnetes.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.