{"id":16407645,"url":"https://github.com/dholbach/addons-demo","last_synced_at":"2025-07-30T01:34:07.515Z","repository":{"id":113971699,"uuid":"219702353","full_name":"dholbach/addons-demo","owner":"dholbach","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-29T07:54:30.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T23:14:39.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dholbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-05T09:08:34.000Z","updated_at":"2020-02-18T17:54:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"27eb5dd2-1092-4668-8207-690e940663af","html_url":"https://github.com/dholbach/addons-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dholbach/addons-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholbach%2Faddons-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholbach%2Faddons-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholbach%2Faddons-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholbach%2Faddons-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dholbach","download_url":"https://codeload.github.com/dholbach/addons-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dholbach%2Faddons-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267792737,"owners_count":24144931,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T06:14:25.766Z","updated_at":"2025-07-30T01:34:07.461Z","avatar_url":"https://github.com/dholbach.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpu-demo\n\n## What this is\nIn this brief demo we'd like to show easily you can bring up a cluster with\ncluster addons. What you will get is:\n\n- a cluster with two nodes (one controlplane, one worker) using VMs\n- `kubeadm` bringing up the addon using the [proposed](https://github.com/kubernetes/kubernetes/compare/master...stealthybox:kubeadm-addon-installer) addon installer\n- the gpu plugin deployed to the cluster as a daemonset\n\n### What has been happening\n\nThe Cluster Addons sub-project of [SIG Cluster\nLifecycle](https://github.com/kubernetes/community/tree/master/sig-cluster-lifecycle)\nbrought together people from various areas of the Kubernetes landscape and produced\nthe following specifications and code:\n\n- Addon Operators\n  - [KEP Addons via Operators](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/addons/0035-20190128-addons-via-operators.md)\n  - [CoreDNS addon operator](https://github.com/kubernetes-sigs/cluster-addons/tree/master/coredns)\n  - [kubebuilder support for addons](https://github.com/kubernetes-sigs/kubebuilder/pull/943)\n- Addon Installer\n  - [the installer itself](https://github.com/kubernetes-sigs/cluster-addons/tree/master/installer)\n  - [KEP Installing Addons in Kubeadm](https://github.com/kubernetes/enhancements/pull/1308)\n  - [Integration of addon installer in kubeadm](https://github.com/kubernetes/kubernetes/pull/85224)\n  - Discussions about how to integrate into `kops` are underway.\n\nCheck out the [meeting minutes](https://docs.google.com/document/d/10_tl_SXcFGb-2109QpcFVrdrfnVEuQ05MBrXtasB0vk/edit) (and videos) for more details and please join the next meetings.\n\n## Getting started\n\nFirst make sure you have go 1.13, git and bazel installed. We'll assume\nyou run Ubuntu or Debian here for simplicity:\n\n```sh\nsudo apt install -y apt-transport-https git snapd curl docker.io vagrant vagrant-cachier virtualbox\nsudo snap install go --channel 1.13/stable --classic\nsudo snap install hub --classic\n\necho \"deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | sudo tee /etc/apt/sources.list.d/bazel.list\ncurl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -\nsudo apt update\nsudo apt install -y bazel\n```\n\n## Build `kubeadm` with Addons installer\n\nWe are going to build a [branch of `kubeadm`, which adds support for\naddons](https://github.com/kubernetes/kubernetes/pull/85224).\nHow this can be used is described in [the KEP](https://github.com/stealthybox/enhancements/blob/20191013-install-addons-via-kubeadm/keps/sig-cluster-lifecycle/addons/20191013-install-addons-via-kubeadm.md#user-stories).\n\n```sh\nexport GOPATH=~/go/\nmkdir -p $GOPATH/src/github.com/kubernetes\ncd $GOPATH/src/github.com/kubernetes/\ngit clone --single-branch https://github.com/kubernetes/kubernetes.git --depth 1\ncd kubernetes\nhub pr checkout 85224\nGO111MODULE=on bazel build //cmd/kubeadm\n```\n\n## Start up cluster\n\nThen get the source of this repo:\n\n```sh\ncd ~\ngit clone https://github.com/dholbach/gpu-demo\n```\n\nAll you need to do for bring up is\n\n```sh\ncd gpu-demo\nvagrant up\n```\n\n## What happens now\n\nFirst of all, `vagrant` will bring up two VMs using `VirtualBox`, it will\ninstall a whole raft of dependencies and make scripts, config and our build\nof `kubeadm` and the GPU plugin available in the VMs, the network is\nconfigured as well.\n\nRelevant code:\n\n- \u003chttps://github.com/dholbach/gpu-demo/blob/master/Vagrantfile\u003e\n- \u003chttps://github.com/dholbach/gpu-demo/blob/master/config/vm-prep.sh\u003e\n\nIn a second step, our build of `kubeadm` is used to [bring up the\ncluster](https://github.com/dholbach/gpu-demo/blob/master/config/kubeadm-init.sh).\n\n\u003e Note: the relevant commands to bring up the cluster can be seen\n\u003e [here](https://github.com/dholbach/gpu-demo/blob/master/config/kubeadm-init.sh#L27-L29).\n\u003e\n\u003e All that is required to bring up the cluster is a [simple cluster\n\u003e config](https://github.com/dholbach/gpu-demo/blob/master/cluster/config.yaml.template)\n\u003e that is passed to `kubeadm`.\n\u003e\n\u003e Here are the [addon related\n\u003e config](https://github.com/dholbach/gpu-demo/blob/master/cluster/config.yaml.template#L19-L25)\n\u003e bits.\n\n## Checking in on the cluster\n\nTo verify all is working as intended, all you need to do is:\n\n```sh\n$ vagrant ssh controlplane-1 -- -tt sudo bash\nroot@controlplane-1:~# kubectl get pods -n kube-system\nNAME                                     READY   STATUS    RESTARTS   AGE\ncoredns-5644d7b6d9-fx27j                 1/1     Running   0          5m35s\ncoredns-5644d7b6d9-r7w8f                 1/1     Running   0          5m35s\netcd-controlplane-1                      1/1     Running   0          4m46s\nintel-gpu-plugin-ghsdk                   1/1     Running   0          3m54s\nintel-gpu-plugin-lmlv8                   1/1     Running   0          5m4s\nkube-apiserver-controlplane-1            1/1     Running   0          4m44s\nkube-controller-manager-controlplane-1   1/1     Running   0          4m43s\nkube-proxy-bpccd                         1/1     Running   0          5m14s\nkube-proxy-ncm8m                         1/1     Running   0          5m36s\nkube-scheduler-controlplane-1            1/1     Running   0          4m33s\nweave-net-8td8g                          2/2     Running   0          5m36s\nweave-net-fwzbj                          2/2     Running   1          5m14s\nroot@controlplane-1:~#\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdholbach%2Faddons-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdholbach%2Faddons-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdholbach%2Faddons-demo/lists"}