Skip to main content
Solved

Kubernetes Question of the day, new format


Geoff Burke
Forum|alt.badge.img+22

What is the command to create a deployment with 7 replicas?

Best answer by Geoff Burke

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!

View original
Did this topic help you find an answer to your question?

13 comments

JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • June 30, 2022

Oh my… open questions now? 😱


Madi.Cristil
Forum|alt.badge.img+8
  • Community Manager
  • 617 comments
  • June 30, 2022

@Geoff Burke makes it difficult for us :D 


Geoff Burke
Forum|alt.badge.img+22
  • Author
  • Veeam Legend, Veeam Vanguard
  • 1318 comments
  • June 30, 2022

this makes it easier. Answers were being put in the comments so it saves me time :) too. 


Madi.Cristil
Forum|alt.badge.img+8
  • Community Manager
  • 617 comments
  • June 30, 2022
Geoff Burke wrote:

this makes it easier. Answers were being put in the comments so it saves me time :) too. 

A matter of perspective, I guess πŸ˜


  • Not a newbie anymore
  • 8 comments
  • June 30, 2022

kubectl scale deployment NAME_OF_DEPLOYMENT --replicas=REPLICASDESIRED -n NAMESPACE_NAME, eg. kubectl scale deploy webapp --replicas=5 -n develop and check changes by using kubectl get pods -n develop -w or kubectl get all -n develop

Also you can do it editing the deployment, e.g. kubectl edit deployment NAME_OF_DEPLOYMENT -n NAMESPACE_NAME, find replicas item and change it.

 

Greets!


marcofabbri
Forum|alt.badge.img+13
  • On the path to Greatness
  • 990 comments
  • June 30, 2022
Madi.Cristil wrote:
Geoff Burke wrote:

this makes it easier. Answers were being put in the comments so it saves me time :) too. 

A matter of perspective, I guess πŸ˜

+1 πŸ˜‚


JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • June 30, 2022

For today’s question:

kubectl create -f ./my-test-deploy.json

kubectl scale deployment my-test-deploy --replicas=7

I assume this can be done much more simple…. 😎

 


Geoff Burke
Forum|alt.badge.img+22
  • Author
  • Veeam Legend, Veeam Vanguard
  • 1318 comments
  • Answer
  • June 30, 2022

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!


Geoff Burke
Forum|alt.badge.img+22
  • Author
  • Veeam Legend, Veeam Vanguard
  • 1318 comments
  • June 30, 2022
marcofabbri wrote:
Madi.Cristil wrote:
Geoff Burke wrote:

this makes it easier. Answers were being put in the comments so it saves me time :) too. 

A matter of perspective, I guess πŸ˜

+1 πŸ˜‚

:). I have to compete with the boss.. Joking aside I am working more in the US now where Kubernetes is starting to steam role ahead and time is becoming an issue. Although Europe is still leading. I also have had to deal with some stuff in South East Asia so I got the β€œvirtual” jet lag experience. My opinion lets go old school :) If I have to work with Tahiti for example it should mean ticket (business class :) ) and week stay.. not running through sub ocean cables :( 


vNote42
Forum|alt.badge.img+13
  • On the path to Greatness
  • 1246 comments
  • July 1, 2022
Geoff Burke wrote:

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!

that's exactly what I would have said πŸ˜Ž


JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • July 1, 2022
vNote42 wrote:
Geoff Burke wrote:

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!

that's exactly what I would have said πŸ˜Ž

🀣🀣🀣


vNote42
Forum|alt.badge.img+13
  • On the path to Greatness
  • 1246 comments
  • July 1, 2022
JMeixner wrote:
vNote42 wrote:
Geoff Burke wrote:

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!

that's exactly what I would have said πŸ˜Ž

🀣🀣🀣

something tells me you do not believe me πŸ˜²


JMeixner
Forum|alt.badge.img+17
  • On the path to Greatness
  • 2650 comments
  • July 1, 2022
vNote42 wrote:
JMeixner wrote:
vNote42 wrote:
Geoff Burke wrote:

This is great folks as it gets people involved and shows variance in answers. Some times there is no real right answer but different ones, some more effective maybe but some more comfortable to a particular user. 

I myself if this was a quick question on an example would do it this way

kubectl create deploy nginxdeploy --image=nginx --replicas=7

but you could just create the deploy and scale too, or create from a json or yaml file.

 

Keep up the great work!

that's exactly what I would have said πŸ˜Ž

🀣🀣🀣

something tells me you do not believe me πŸ˜²

What? Me? Never…. 😎


Comment