I am trying to create a deployment with Kubectl run. I want to specify replicas as part of the command. I get
Error: unknown flag: --replicas
Is this deprecated in the current version. If yes how do we achieve replicas.
Using kubectl run
for deployments has been deprecated for quite some time and removed in a recent kubernetes version.
If you want to create a deployment using the kubectl commandline, use
kubectl create deployment $deploymentname --image $image --replicas $replicacount
see the official documentation for here for more detail.