kubernetes – Creating a replication controller with kubectl

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?

Read more here: Source link