dia
dia

Reputation: 51

is it possible to create two deployments inside one namespace in K8S?

I am begginer at K8S, i'm using github actions I have 3 environment (dev, pred-prod, prod) and 3 namespace to each environment, i want to have a second environment (pre-prod-2) into my namespace of pre-production; is it possible ? and how the yaml file will look like ?

Thank you

Upvotes: 1

Views: 2283

Answers (1)

jwhb
jwhb

Reputation: 546

To create another independent deployment in the same namespace, take your existing Deployment YAML and change the following fields:

  • metadata.name
  • spec.selector.matchLabels.app
  • template.metadata.labels.app

It will be sufficient to just append a "2" to each of these values.

Upvotes: 1

Related Questions