KimHunJin / k8sPlayground-HLF

k8sPlayground, Hyperledger Fabric version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

k8sFabricplayground

k8sFabricPlayground is based k8sPlayground .

k8sFabricPlayground sets up a kubernetes cluster on three VirtualBox virtual machines (one master and two workers) running Ubuntu 18.04 LTS using kubeadm.

Change Log

  • k8s specific version = 1.11.0
  • docker specific version = docker-ce:17.03
  • Switch a pod network, flannel
  • increase master's memory

Prerequisites

Installation

$ git clone https://github.com/redtree0/k8sFabricPlayground
$ cd k8sFabricPlayground
$ pip install virtualenv
$ virtualenv -p python3 k8s_env
$ source k8s_env/bin/activate

In the virtual environment, run

$ pip install -r requirements.txt

Install ansible roles.

$ ansible-galaxy install -r requirements.yml -p roles/

Create Virtual Machines

Run vagrant up to bring up three virtual machines.

The hostnames and IP addresses of the machines are as follows:

kubemaster — 192.168.99.20

worker1 – 192.168.99.21

worker2 – 192.168.99.22

Create kubernetes cluster

$ make cluster

As soon as it is done, you can ssh into kubemaster to see the nodes in the cluster by running kubectl get nodes. They may take a while to get ready. You should see something like this:

NAME         STATUS    ROLES     AGE       VERSION
kubemaster   Ready     master    6m        v1.10.3
worker1      Ready     <none>    5m        v1.10.3
worker2      Ready     <none>    5m        v1.10.3

Tear down cluster

$ make clean

This will drain the nodes, make sure that they are empty before shutting them down and reset all kubeadm installed state.

About

k8sPlayground, Hyperledger Fabric version


Languages

Language:Go 61.6%Language:JavaScript 21.2%Language:Shell 8.7%Language:Python 8.3%Language:Makefile 0.1%