Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leandroberetta/hello-flask
https://github.com/leandroberetta/hello-flask
docker flask kubernetes openshift python
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/leandroberetta/hello-flask
- Owner: leandroberetta
- Created: 2018-11-27T14:34:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-27T15:09:30.000Z (about 6 years ago)
- Last Synced: 2024-11-18T21:04:00.417Z (2 months ago)
- Topics: docker, flask, kubernetes, openshift, python
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hello-flask
Simple Flask HTTP service.
## Deploy into OpenShift
Run the following command:
oc new-app https://github.com/leandroberetta/hello-flask.git
Expect the following output:
--> Found image 292ed8d (5 months old) in image stream "dev/python" under tag "3-onbuild" for "python:3-onbuild"
* A Docker build using source code from https://github.com/leandroberetta/hello-flask.git will be created
* The resulting image will be pushed to image stream "hello-flask:latest"
* Use 'start-build' to trigger a new build
* This image will be deployed in deployment config "hello-flask"
* Port 4000 will be load balanced by service "hello-flask"
* Other containers can access this service through the hostname "hello-flask"
* WARNING: Image "dev/python:3-onbuild" runs as the 'root' user which may not be permitted by your cluster administrator--> Creating resources ...
imagestream "hello-flask" created
buildconfig "hello-flask" created
deploymentconfig "hello-flask" created
service "hello-flask" created
--> Success
Build scheduled, use 'oc logs -f bc/hello-flask' to track its progress.
Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
'oc expose svc/hello-flask'
Run 'oc status' to view your app.Next, create a route to expose the application:
oc expose svc/hello-flask
Finally test it with curl:
curl hello-flask-dev.192.168.64.109.nip.io
Hello!