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
| # Remember, every K8s object has apiVersion, kind, metadata, and a spec.
apiVersion: apps/v1
# 1. This config is nearly identical to ReplicaSet, except for the kind.
kind: Deployment
metadata:
# 2. We also named it appropriately.
name: myapp-deployment
labels:
app: myapp
type: front-end
super: mario
spec:
template:
metadata:
name: myapp-pod
labels:
app: myapp
type: front-end
boop: blarp
spec:
containers:
- name: nginx-container
image: nginx
selector:
matchLabels:
type: front-end
replicas: 3
|