{"id":16710659,"url":"https://github.com/mdgriffith/kubernetes-starterkit","last_synced_at":"2025-10-24T14:13:29.647Z","repository":{"id":77476527,"uuid":"64225292","full_name":"mdgriffith/kubernetes-starterkit","owner":"mdgriffith","description":"WARNING:  not for use quite yet.","archived":false,"fork":false,"pushed_at":"2016-10-25T21:45:57.000Z","size":58,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T06:51:52.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdgriffith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-07-26T13:54:16.000Z","updated_at":"2020-02-14T19:58:56.000Z","dependencies_parsed_at":"2023-03-16T16:30:24.761Z","dependency_job_id":null,"html_url":"https://github.com/mdgriffith/kubernetes-starterkit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fkubernetes-starterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fkubernetes-starterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fkubernetes-starterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Fkubernetes-starterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgriffith","download_url":"https://codeload.github.com/mdgriffith/kubernetes-starterkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248164010,"owners_count":21058066,"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":[],"created_at":"2024-10-12T20:09:13.047Z","updated_at":"2025-10-24T14:13:24.614Z","avatar_url":"https://github.com/mdgriffith.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes StarterKit\nA basic Kubernetes setup for local development and deployment to google cloud.  \n\nIt installs the following:\n  * A basic Python Flask app\n  * Nginx\n  * A Postgres Database\n\n## Prerequisites\n\n  * Clone this repo to a local dir.\n  * Install [Google Cloud SDK](https://cloud.google.com/sdk/) _(If you want to deploy to google container engine)_\n  * Install [kubectl](http://kubernetes.io/docs/user-guide/prereqs/) _(A command line utility for managing a kubernetes cluster)_\n  * Install [minikube](https://github.com/kubernetes/minikube) _(for running kubernetes locally)_\n  * Install Python 2.7, Virutalenv, and PIP\n\n\n## Developing locally\n\nTo initially set everything up, run\n\n`source activate.sh`\n\nThis will create a python virtualenv (which allows for the following `install` and `deploy` commands to work) and start a local kubernetes instance using minikube.\n\nRun `install dev`.  This will build and deploy our app on the minikube.\n\nIt will ask you to set a database username and password for Postgres.\n\nOnce this is running, use `minikube ip` to see what IP address it's running on.\n\nThe __app/api__ directory is mounted inside the Kubernetes pod, so you can modify the python code and changes will automatically be reloaded in the local Kubernetes instance.\n\nSame with the __app/nginx/serve__ drectory.  Adding files to that folder will serve them through the `static/` folder.\n\n## Shutting down for the day\n\nWhen you want to stop developing you can run\n\n  * `deactivate`, which will turn off the python environment, which is what allows our `install` and `deploy` commands to work.  \n  * `minikube stop` to stop the local minikube virtual machine.\n\nThen, when you return to work on this project:\n\n  * `source activate.sh` - Turn on minikube and activate our python environment.\n\n\n\n\n## Some Useful Commands\n\nCommand                | Description\n-----------------------|------------------\n`minikube ip`          | See the Ip that minikube is running on locally.\n`minikube stop`        | Stop the minikube (does not delete app)\n`minikube start`       | Start the minikube\n`minikube delete`      | Delete local kubernetes instance\n`minikube dashboard`   | Get the address of the Kubernetes Dashboard for local.\n`source activate.sh`   | Setup python so that the below commands can work\n`deploy dev`           | Deploy a dev environment. \n`logs dev`             | Stream the app(specifically Python/flask) logs to the terminal\n`deploy prod`          | Deploy to google container engine.\n\nIn the above commands, when `dev` or `prod` is mentioned, those correspond to config files in `/kube/deployments/`.\n\n\n## Browsing the Database\n\n[PgAdmin](https://www.pgadmin.org/) can be used as a database explorer.  \n\nWhen running locally, the local database is accessible with the following information_schema:\n * _Host_ - 192.168.99.100 (or whatever the command `minikube ip` returns)\n * _Port_ - 32000\n * _Service_ - __blank__\n * _Username_ - Whatever username you specified when setting up.\n * _Password_ - Whatever password you specified when setting up.\n\n\n## Deploying To Google Container Engine\nCheck out the DEPLOY-GOOGLE.md file for instructions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Fkubernetes-starterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgriffith%2Fkubernetes-starterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Fkubernetes-starterkit/lists"}