feat: Add complete Python Flask API example with deployment, service, and comprehensive documentation
This commit is contained in:
31
examples/python-flask/python-flask-deployment.yaml
Normal file
31
examples/python-flask/python-flask-deployment.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: python-flask
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python-flask
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python-flask
|
||||
spec:
|
||||
containers:
|
||||
- name: python-flask
|
||||
image: python:3.11-alpine
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
pip install flask &&
|
||||
python /app/app.py
|
||||
volumeMounts:
|
||||
- name: app-code
|
||||
mountPath: /app
|
||||
volumes:
|
||||
- name: app-code
|
||||
configMap:
|
||||
name: python-flask-app
|
||||
Reference in New Issue
Block a user