├── .gitignore ├── LICENSE ├── README.md ├── Vagrantfile ├── dind-cluster-wrapper.sh ├── docker-compose-registry-proxy.yml ├── docker-compose.yml ├── docs ├── APIC-Quick-Guide.md ├── All-in-One-Playground-Overview.md ├── All-in-One-Playground-Usage-Guide.md ├── Launch-Utility-Usage-Guide.md ├── demo-apic.gif ├── demo-apps.gif ├── demo-oc.gif ├── demo-offline.gif └── demo-tools.gif └── install ├── certs ├── lab-ca.pem.crt ├── registry-1.docker.io.crt └── registry-1.docker.io.key ├── completion.sh ├── config.sh ├── dind-cluster.sh ├── funcs.sh ├── launch.sh └── targets ├── apic.sh ├── apic ├── CustomResourceDefinition.yml ├── apic-base.sh ├── apic-dind.sh ├── apic-oc.sh ├── coredns.yml ├── ingress-config.yml ├── pv │ ├── host │ │ ├── analyt.yml │ │ ├── gwy.yml │ │ ├── mgmt.yml │ │ └── ptl.yml │ ├── local │ │ ├── analyt.yml │ │ ├── gwy.yml │ │ ├── mgmt.yml │ │ └── ptl.yml │ └── sc.yml └── settings.sh ├── docker-compose.sh ├── docker.sh ├── endpoints.sh ├── env.sh ├── helm.sh ├── images.list ├── init.sh ├── istio-bookinfo.sh ├── istio.sh ├── istio ├── istio-base.sh ├── istio-crc.sh ├── istio-dind.sh ├── istio-nginx.conf ├── istio-oc.sh └── istio-openshift.sh ├── kubectl.sh ├── kubernetes.sh ├── kubernetes ├── crc-nginx.conf ├── crc.sh ├── daemon.json ├── dind.sh └── oc.sh ├── registry-proxy.sh ├── registry.sh ├── sample.sh └── tools.sh /.gitignore: -------------------------------------------------------------------------------- 1 | install/*cache 2 | install/logs 3 | install/targets/endpoints 4 | .vagrant 5 | .env -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 MorningSpace 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The All-in-One Playground for Kubernetes 2 | 3 | [![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/morningspace/lab-k8s-playground/blob/master/LICENSE) 4 | [!["Latest Release"](https://img.shields.io/github/release/morningspace/lab-k8s-playground.svg)](https://github.com/morningspace/lab-k8s-playground/releases/latest) 5 | [![Gitter](https://badges.gitter.im/morningspace/community.svg)](https://gitter.im/morningspace/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 6 | 7 | ## Overview 8 | 9 | This lab project is a playground for you to play with Kubernetes easily and efficiently. 10 | 11 | It includes an `All-in-One Playground` that can launch a single- or multi-node cluster with configurable Kubernetes version and distribution, e.g. standard Kubernetes or OpenShift, on your local machine in minutes in a repeatable manner even without network connectivity! 12 | 13 | * If you want to try the `All-in-One Playground`, please refer to ["The All-in-One Kubernetes Playground Overview"](/docs/All-in-One-Playground-Overview.md), ["The All-in-One Kubernetes Playground Usage Guide"](/docs/All-in-One-Playground-Usage-Guide.md) or ["All-in-One K8S Playground中文使用指南"](https://morningspace.github.io/tech/all-in-one-k8s-playground/). 14 | * If you want to know what is the magic behind, please refer to ["Launch multi-node Kubernetes cluster locally in one minute, and more..."](https://morningspace.github.io/tech/k8s-run/), and the video series on [YouTube](https://www.youtube.com/watch?v=0uVdF3Inv48&list=PLVQM6jLkNkfqHgd0aX7TnjioOiQrqsXIa) or [YouKu](https://v.youku.com/v_show/id_XNDI2Mzk1NDcyMA==.html?f=52221532). 15 | * If you want to start in a funny way, please take look at this [`special function`](https://morningspace.github.io/lab-k8s-playground/docs/slides/#/11/1) written in shell script and taken from the online ["Introduction Slides"](https://morningspace.github.io/lab-k8s-playground/docs/slides). 16 | 17 | More cool features will be coming soon... Have Fun! 18 | 19 | ## Demos 20 | 21 | Below are demos created based on the `All-in-One Playground`. 22 | 23 | > Use [Dashboard](https://github.com/kubernetes/dashboard), [Grafana](https://grafana.com), [Kiali](https://www.kiali.io), [Jaeger](https://www.jaegertracing.io) when run [Istio](https://istio.io) [Bookinfo](https://istio.io/docs/examples/bookinfo) demo app. 24 | 25 | ![](/docs/demo-apps.gif) 26 | 27 | > Run Kubernetes-related command line tools from both normal terminal and web terminal. 28 | 29 | ![](/docs/demo-tools.gif) 30 | 31 | > Re-launch Kubernetes cluster and deploy [Helm](https://helm.sh) where there is no network connectivity. 32 | 33 | ![](/docs/demo-offline.gif) 34 | 35 | > Launch [API Connect](https://developer.ibm.com/apiconnect) on top of Kubernetes cluster in the All-in-One Playground. 36 | 37 | ![](/docs/demo-apic.gif) 38 | 39 | > Launch standard Kubernetes cluster and OpenShift cluster on the same machine, then use [kubectx](https://github.com/ahmetb/kubectx) to switch context between them. 40 | 41 | ![](/docs/demo-oc.gif) 42 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # set number of vcpus 2 | cpus = '6' 3 | # set amount of memory allocated by vm 4 | memory = '8192' 5 | 6 | # targets to be run, can be customized as your need 7 | targets = "init default helm tools" 8 | 9 | # set Kubernetes version, supported versions: v1.12, v1.13, v1.14, v1.15 10 | k8s_version = "v1.14" 11 | # set Kubernetes provider, supported providers: dind, oc, crc 12 | k8s_provider = "dind" 13 | # set number of worker nodes 14 | num_nodes = 2 15 | # set host ip of the box 16 | host_ip = '192.168.56.100' 17 | 18 | # special optimization for users in China, 1 or 0 19 | is_in_china = 0 20 | # set https proxy 21 | https_proxy = "" 22 | 23 | ############################################################################### 24 | # DO NOT MODIFY ANYTHING BELOW THIS POINT # 25 | ############################################################################### 26 | 27 | rsa_private_key = IO.read(Vagrant::Util::Platform.fs_real_path("#{Vagrant.user_data_path}/insecure_private_key")) 28 | user_home = "/home/vagrant" 29 | 30 | configure_ssh_keys = <