Skip to content

Commit

Permalink
amend: Dockerfile base image
Browse files Browse the repository at this point in the history
add: deploy.yml for K8s
  • Loading branch information
HYmian committed Mar 5, 2019
1 parent 18afd0a commit 773a6e8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM golang:1.7
FROM centos:7

WORKDIR /var

Expand Down
49 changes: 49 additions & 0 deletions deploy.yaml
@@ -0,0 +1,49 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: webDemo
name: webDemo
spec:
replicas: 4
selector:
matchLabels:
app: nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: webDemo
spec:
containers:
- image: ymian/webDemo
imagePullPolicy: Always
name: webDemo
ports:
- containerPort: 3000
protocol: TCP
resources:
limits:
cpu: 1
requests:
cpu: 1
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
app: webDemo
name: webDemo
spec:
ports:
- name: http
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: webDemo

0 comments on commit 773a6e8

Please sign in to comment.