Created
November 21, 2020 08:00
-
-
Save TrongTan124/c078852b1e5984835101402f41020155 to your computer and use it in GitHub Desktop.
lab2-kubernetes-deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 #Older versions of k8s use apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-deploy | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: nginx-dev | |
minReadySeconds: 10 | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxUnavailable: 1 | |
maxSurge: 1 | |
template: | |
metadata: | |
labels: | |
app: nginx-dev | |
spec: | |
containers: | |
- name: nginx-pod | |
image: nginx:1.15 | |
ports: | |
- containerPort: 80 | |
livenessProbe: | |
tcpSocket: | |
port: 80 | |
initialDelaySeconds: 10 | |
periodSeconds: 3 | |
readinessProbe: | |
tcpSocket: | |
port: 80 | |
initialDelaySeconds: 15 | |
periodSeconds: 5 | |
resources: | |
requests: | |
cpu: "50m" | |
memory: "64Mi" | |
limits: | |
cpu: "100m" | |
memory: "128Mi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment