38 lines
576 B
YAML
38 lines
576 B
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: blog-svc
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
protocol: TCP
|
|
selector:
|
|
app: blog
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: blog-dep
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: blog
|
|
replicas: 3
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: blog
|
|
spec:
|
|
containers:
|
|
- name: blog
|
|
image: scottyah/blog:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
imagePullSecrets:
|
|
- name: secret/dockercred
|
|
|