I am trying to create a replicaset with kubernetes. This time, I don’t have a yml file and this is why I am trying to create the replicaset using a command line.
Why kubectl create replicaset somename --image=nginx
raise an error, and how to fix this?
2
Answers
You cannot create
replicaset
using the command line. Only the following resource creation is possible usingkubectl create
:Although, You may use the following way to create the replica set, in the below example,
kubectl create -f
is fed with stdout(-
):Hello, hope you are enjoying your kubernetes journey !
In fact, you cannot create a RS directly, but if you really don’t want to use manifest, you can surely create it via a deployment:
here it is:
bguess