Let’s look at the following diagram to create Kubernetes Replication Controller:

What to remember when creating ReplicationController
- apiVersion: v1
- You can define number of
replicas
,selector
andtemplate
underspec
spec->template
has its ownspec
section along sidemetadata
- You specify containers’ related attributes under
template
‘s spec
Create ReplicationController YAML file example
YAML
x
20
20
1
apiVersion v1
2
kind ReplicationController
3
metadata
4
name nginx
5
spec
6
replicas3
7
selector
8
app nginx
9
template
10
metadata
11
name nginx
12
labels
13
app nginx
14
spec
15
containers
16
name nginx
17
image nginx
18
ports
19
containerPort80
20

I build softwares that solve problems. I also love writing/documenting things I learn/want to learn.