Skip to content

forksumit/flask-hello-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Hello World on Kubernetes via Helm

Build

  • Set an environment variable with your GCP Project ID:
export GOOGLE_CLOUD_PROJECT=<PROJECT_ID>
gcloud builds submit --tag=gcr.io/${GOOGLE_CLOUD_PROJECT}/flask-helloworld src/

Run Locally

docker run -p 8080:8080 -e PORT=8080 --rm gcr.io/${GOOGLE_CLOUD_PROJECT}/flask-helloworld

Test

pytest src/tests/

Note: you may need to install pytest using pip install pytest.

Deploy

Helm

  • Complete the Build step
  • Install/ Upgrade a release
helm upgrade --install dev ./helm/ --set gcpProjectId="${GOOGLE_CLOUD_PROJECT}" --debug

Cloud Build

gcloud builds submit --config=cloudbuild.yaml --substitutions=_CLOUDSDK_COMPUTE_ZONE="<CLUSTER-ZONE>",_CLOUDSDK_CONTAINER_CLUSTER="<CLUSTER-NAME>"

Note: Make sure your cloud build service account have all the required permissions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors