Skip to content

Instantly share code, notes, and snippets.

@chaitanyamannem
Created September 14, 2020 02:58
Show Gist options
  • Save chaitanyamannem/b1dd6a9d98ecdd6cf31ac0db8d18ed47 to your computer and use it in GitHub Desktop.
Save chaitanyamannem/b1dd6a9d98ecdd6cf31ac0db8d18ed47 to your computer and use it in GitHub Desktop.
Kubernetes Deployment File
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-script
spec:
replicas: 1
selector:
matchLabels:
app: python-script
template:
metadata:
labels:
app: python-script
spec:
volumes:
# `name` here must match the name
# specified in the volume mount
- name: json-configmap-volume
#
configMap:
# `name` here must match the name
# specified in the ConfigMap's YAML
name: json-configmap
containers:
- name: python-script
image: python-app:latest
volumeMounts:
- mountPath: /etc/config
name: json-configmap-volume
resources:
requests:
cpu: 100m
memory: 1Gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment