SrinivasG:
<#CHBEF7N4B|kubernetes> I just started learning the kubernetes and going throught he kubernetes for the absolute beginners course and got struck at ReplicaSets yaml file creation. I am little confused with the process. Do we need to create the POD definition file first and then we need to pass or copy paste the same details in the Template section in the ReplicaSet yaml file?
Mohamed Ayman:
Hello @SrinivasG,
Yes, that’s a good practice Also you can refer to the documentation to copy the Yaml and use it.
https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
SrinivasG:
<#CHBEF7N4B|kubernetes> @Mohamed Ayman I think you did not catch my question. I understood that ReplicaSet is to maintain a stable set of replica pods running at any given time.
But my question here is, before creating the ReplicaSet YANL file, we should create the POD using the pod-definition.yaml file right? or else can we create the POD also using ReplicaSet YAML file?
unnivkn:
Hi @SrinivasG pod and replicasets are different resources we can create in a k8s cluster. While creating replicasets you will get the pods which are associated with that replicasets.