{"id":15524554,"url":"https://github.com/sergeyklay/kubernetes-playground","last_synced_at":"2025-09-07T14:36:55.792Z","repository":{"id":145824910,"uuid":"202998748","full_name":"sergeyklay/kubernetes-playground","owner":"sergeyklay","description":"My multihost VM provisioning powered by Vagrant for local Kubernetes experiments","archived":false,"fork":false,"pushed_at":"2019-09-11T22:08:36.000Z","size":186,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T22:41:20.799Z","etag":null,"topics":["ansible","hacktoberfest","kube-cluster","kubernetes","kubernetes-cluster","kubernetes-setup","local-development","vagrant","virtual-machine","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergeyklay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-18T12:12:53.000Z","updated_at":"2023-08-31T17:49:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"db65a46a-896b-4bae-bffe-a9721debc953","html_url":"https://github.com/sergeyklay/kubernetes-playground","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fkubernetes-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fkubernetes-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fkubernetes-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fkubernetes-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergeyklay","download_url":"https://codeload.github.com/sergeyklay/kubernetes-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250391661,"owners_count":21422946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","hacktoberfest","kube-cluster","kubernetes","kubernetes-cluster","kubernetes-setup","local-development","vagrant","virtual-machine","virtualbox"],"created_at":"2024-10-02T10:51:41.433Z","updated_at":"2025-04-23T07:32:05.195Z","avatar_url":"https://github.com/sergeyklay.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multihost Virtual Machine Provisioning powered by Vagrant\n\nA skeleton repository that considerably simplifies setting up a\nmulti VM Kubernetes cluster with a VirtualBox Virtual Machine development\nenvironment powered by Vagrant and different provisioners like Shell and\nAnsible.\n\n_This project is designed for local development only._\n\n## Architecture\n\nThis project allows you to create a Kubernetes cluster with control-plane node (which controls the cluster),\nand two (by default) worker nodes (where your workloads, like Pods and Deployments run).\nComponents used by default are provided below:\n\n| IP            | Hostname      | Components                                                |\n| ------------- | ------------- | --------------------------------------------------------- |\n| 192.168.77.9  | `ctl.k8s`     | Ansible Controller to run provision on Kubernetes cluster |\n| 192.168.77.10 | `master.k8s`  | `kube-apiserver`, `kube-controller-manager`, `kube-scheduler`, `etcd`, `kubelet`, `kubeadm`, `kubctl`, `docker-ce` |\n| 192.168.77.11 | `worker1.k8s` | `kubelet`, `kubeadm`, `docker-ce`                         |\n| 192.168.77.12 | `worker2.k8s` | `kubelet`, `kubeadm`, `docker-ce`                         |\n\nAdd-ons on control plane are:\n\n- [Addon-manager](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/addon-manager)\n- [Dashboard](https://github.com/kubernetes/dashboard/)\n- [Calico](https://docs.projectcalico.org/)\n\n## Prerequisites\n\n- [VirtualBox](https://virtualbox.org/) \u003e= 5.2\n- [Vagrant](https://vagrantup.com/) \u003e= 2.2\n\nRecommended Vagrant Plugins\n\n- vagrant-vbguest\n- vagrant-env\n- vagrant-scp\n\n## Getting started\n\nAfter having done the adjustments you can startup and provision your\nwhole VM environment with a simple:\n\n```shell script\nvagrant up\n```\n\n## Configure `kubectl`\n\nTo use [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) at your local workstation\nrun commands as follows:\n\n```shell script\nmkdir -p $HOME/.kube\nvagrant scp master:/home/vagrant/.kube/config $HOME/.kube/config\n```\n\nNotice, to use `vagrant scp` command you'll need install `vagrant-scp` plugin.\nAnother way to obtain config is to use `scp` as follows:\n\n```shell script\n# use \"vagrant\" passowrd\nscp vagrant@192.168.77.10:/home/vagrant/.kube/config $HOME/.kube/config\n```\n\n## Test the installation\n\n```shell script\nkubectl cluster-info\n\n# You will  response like this:\n#\n# Kubernetes master is running at https://192.168.77.10:6443\n# KubeDNS is running at https://192.168.77.10:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy\n#\n# To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.\n\nkubectl get pods --all-namespaces\n\n# You will see response like this:\n#\n# NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE\n# kube-system   calico-kube-controllers-65b8787765-lvn9s   1/1     Running   0          3m42s\n# kube-system   calico-node-5qb6d                          1/1     Running   0          27s\n# kube-system   calico-node-jfhfn                          1/1     Running   0          57s\n# kube-system   calico-node-tvrtv                          1/1     Running   0          3m42s\n# kube-system   coredns-5c98db65d4-5jq5s                   1/1     Running   0          5m59s\n# kube-system   coredns-5c98db65d4-l5cnf                   1/1     Running   0          5m59s\n# kube-system   etcd-master                                1/1     Running   0          5m13s\n# kube-system   kube-addon-manager-master                  1/1     Running   0          6m17s\n# kube-system   kube-apiserver-master                      1/1     Running   0          5m18s\n# kube-system   kube-controller-manager-master             1/1     Running   0          4m52s\n# kube-system   kube-proxy-95g9n                           1/1     Running   0          5m58s\n# kube-system   kube-proxy-bghgg                           1/1     Running   0          27s\n# kube-system   kube-proxy-hgcxb                           1/1     Running   0          57s\n# kube-system   kube-scheduler-master                      1/1     Running   0          4m52s\n# kube-system   kubernetes-dashboard-7d75c474bb-6b2sn      1/1     Running   0          3m32s\n\nkubectl get nodes\n\n# You will see response like this:\n#\n# NAME          STATUS   ROLES    AGE     VERSION\n# master    Ready    master   6m47s   v1.15.3\n# worker1   Ready    \u003cnone\u003e   86s     v1.15.3\n# worker2   Ready    \u003cnone\u003e   56s     v1.15.3\n\nkubectl get services --all-namespaces\n\n# You will see response like this:\n#\n# NAMESPACE     NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE\n# default       kubernetes             ClusterIP   10.96.0.1       \u003cnone\u003e        443/TCP                  21m\n# kube-system   kube-dns               ClusterIP   10.96.0.10      \u003cnone\u003e        53/UDP,53/TCP,9153/TCP   21m\n# kube-system   kubernetes-dashboard   ClusterIP   10.102.203.67   \u003cnone\u003e        443/TCP                  19m\n```\n\nAt this point you should have a fully-functional Kubernetes cluster on which you can run workloads.\n\n## Run Dashboard\n\nIf you want to connect to the API Server from outside the cluster (e.g. your local workstation)\nyou must create a secure channel to your Kubernetes cluster using `kubectl`:\n\n```shell script\nkubectl proxy --accept-hosts='^*$'\n```\n\nAnd access Dashboard at:\n\n[`http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/`](\nhttp://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/).\n\nTo find out how to create sample user and log in follow\n[Creating sample user](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md) guide.\n\n## Clean-up\n\nExecute the following command to remove the virtual machines created for the Kubernetes cluster:\n\n```shell script\nvagrant destroy -f\n```\n\nYou can destroy individual machines by:\n\n```shell script\nvagrant destroy \u003cVM NAME\u003e -f\n```\n\n## License\n\nThis project is open source software licensed under the MIT Licence.\nFor more see LICENSE.txt file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fkubernetes-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeyklay%2Fkubernetes-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fkubernetes-playground/lists"}