Skip to content

Instantly share code, notes, and snippets.

@MathiasGruber
Created June 20, 2021 18:50
Show Gist options
  • Save MathiasGruber/c912714845b61c624e160fb53e78d04d to your computer and use it in GitHub Desktop.
Save MathiasGruber/c912714845b61c624e160fb53e78d04d to your computer and use it in GitHub Desktop.
Super simple example for deploying model into Kubernetes
apiVersion: v1
kind: Service
metadata:
labels:
app: [VAR_MODULE_NAME]
name: [VAR_MODULE_NAME]
spec:
ports:
- name: predict
port: 5000
targetPort: 5000
selector:
app: [VAR_MODULE_NAME]
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: [VAR_MODULE_NAME]
name: [VAR_MODULE_NAME]
spec:
selector:
matchLabels:
app: [VAR_MODULE_NAME]
template:
metadata:
labels:
app: [VAR_MODULE_NAME]
spec:
containers:
- image: [VAR_IMAGE_URL]
imagePullPolicy: IfNotPresent
name: [VAR_MODULE_NAME]
ports:
- containerPort: 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment