Home > Enterprise >  Creating a replication controller with kubectl
Creating a replication controller with kubectl

Time:12-12

Reading through "Kubernetes In Action" book, there is a kubectl command which creates a pod but does not deploy it:

$ kubectl run kubia --image=dockeruser/kubia --port=8080 --generator=run/v1
replicationcontroller "kubia" created

The generator option is there to ensure that a replication controller is created and that there is no deployment. But in the version of kubectl that I am using, v1.22.3, the generator flag is deprecated. Leaving the generator option out will create the pod, but no replication controller.

Which command effectively creates the rc?

CodePudding user response:

You don't need "generator" starting 1.17, you can use "create" like kubectl create deployment kubia --image=dockeruser/kubia --port=8080

  • Related