diff --git a/k8s.yaml b/k8s.yaml new file mode 100644 index 0000000..05c66e6 --- /dev/null +++ b/k8s.yaml @@ -0,0 +1,37 @@ +--- +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 +