python/django/python-hello-world/kubernetes-manifests/hello.deployment.yaml (31 lines of code) (raw):
# This Deployment manifest defines:
# - single-replica deployment of the container image, with label "app: django-python-hello-world"
# - Pod exposes port 8080
# - specify PORT environment variable to the container process
# Syntax reference https://kubernetes.io/docs/concepts/configuration/overview/
apiVersion: apps/v1
kind: Deployment
metadata:
name: django-python-hello-world
labels:
app: django-python-hello-world
tier: app
spec:
replicas: 1
selector:
matchLabels:
app: django-python-hello-world
tier: app
template:
metadata:
labels:
app: django-python-hello-world
tier: app
spec:
containers:
- name: django-python-hello-world
image: django-python-hello-world
ports:
- containerPort: 8080
env:
- name: PORT
value: "8080"
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5