backend/k8s/backend.yml

45 lines
756 B
YAML
Raw Normal View History

2020-11-25 23:54:52 +01:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: onspot
labels:
app: backend
spec:
replicas: 1
selector:
matchLabels:
app: backend
strategy:
type: Recreate
template:
metadata:
labels:
app: backend
spec:
containers:
- name: backend
image: registry.kmlabz.com/onspot/backend
imagePullPolicy: Always
ports:
- containerPort: 8080
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: backend
namespace: onspot
labels:
app: backend
spec:
ports:
- name: backend
port: 80
targetPort: 8080
protocol: TCP
selector:
app: backend
type: ClusterIP