Welcome to the Linux Foundation Forum!

When to define Pods, ReplicaSets and Deployments

Hello,

This question is about Lesson 9.

Following the demo "Demo: Deployment Rolling Update and Rollback" I can see that when a deployment is created, a ReplicaSet and a Pod is created along the deployment.

However, no declaration on a yaml file for the ReplicaSet and the Pod were created before.

Thus, my question is when is it required to define the yaml template/ create a replicaSet or Pod, since when creating a Deployment they seem to be created.

Thank you.

Comments

  • chrispokorni
    chrispokorni Posts: 2,340

    Hi @josepmaria,

    It seems you just answered your own question:

    ... I can see that when a deployment is created, a ReplicaSet and a Pod is created along the deployment.

    and

    ... when creating a Deployment they seem to be created

    In summary, a Deployment created imperatively does not require explicit creation of the Pod and ReplicaSet objects, while a Deployment created declaratively includes a Pod template but no explicit ReplicaSet in its manifest.

    Regards,
    -Chris

  • josepmaria
    josepmaria Posts: 41

    @chrispokorni ,

    Thank you for your time and answer. I appreciate it.

    Sincerely,

    Josep Maria

Categories

Upcoming Training