Commit acfc3a97 authored by Vũ Hoàng Nam's avatar Vũ Hoàng Nam

Add daemonset.yml, deployment.yml, service.yml.

parent 54f7a7ea
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: web-app-daemonset
namespace: default
labels:
env: dev
spec:
selector:
matchLabels:
name: web-app
template:
metadata:
labels:
name: web-app
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
volumeMounts:
- name: varlog
mountPath: /var/log
volumes:
- name: varlog
hostPath:
path: /var/log
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app-deployment
spec:
replicas: 2
selector:
matchLabels:
app: web-app
revisionHistoryLimit: 5
progressDeadlineSeconds: 300
minReadySeconds: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
template:
metadata:
labels:
app: web-app
spec:
containers:
- name: hello-ctr
image: nigelpoulton/k8sbook:1.0
ports:
- containerPort: 8080
apiVersion: v1
kind: Service
metadata:
name: hello-svc
labels:
app: web-app
spec:
type: NodePort
ports:
- port: 8080
nodePort: 30001
protocol: TCP
selector:
app: web-app
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment