-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdeployment.yaml
43 lines (43 loc) · 1.26 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
# api version used when sending definition to kubernetes cluster
apiVersion: apps/v1
# Definition of kubernetes object
kind: Deployment
# Description of object with additional labels and/or annotations
metadata:
name: my-deployment
labels:
app: my-deployment
# Definition of the Deployment object with defined pods and its containers.
spec:
# number of running pods
replicas: 1
selector:
matchLabels:
app: my-deployment
template:
metadata:
labels:
app: my-deployment
spec:
# definition of a pod with single or multiple containers
containers:
# definition of container image used
- image: eu.gcr.io/k8s-workshop-274312/k8s-workshop:stable
# name of the container
name: k8s-workshop
# expose a http port if container supports it
ports:
- name: http
containerPort: 80
protocol: TCP
# limits of the container to prevent excessive usage of resources
resources:
# request for resources at start
requests:
memory: "64Mi"
cpu: "250m"
# resource limit when the pod is running
limits:
memory: "128Mi"
cpu: "500m"