Solved

Kubernetes Question of the day, new format


Userlevel 7
Badge +22

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

icon

Best answer by Geoff Burke 30 June 2022, 17:05

View original

13 comments

Userlevel 7
Badge +17

Oh my… open questions now? 😱

Userlevel 7
Badge +7

@Geoff Burke makes it difficult for us :D 

Userlevel 7
Badge +22

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

Userlevel 7
Badge +7

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

A matter of perspective, I guess 😁

Userlevel 1

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!

Userlevel 7
Badge +13

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

A matter of perspective, I guess 😁

+1 😂

Userlevel 7
Badge +17

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…. 😎

 

Userlevel 7
Badge +22

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!

Userlevel 7
Badge +22

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 :( 

Userlevel 7
Badge +13

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 😎

Userlevel 7
Badge +17

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 😎

🤣🤣🤣

Userlevel 7
Badge +13

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 😲

Userlevel 7
Badge +17

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