skip to Main Content

I am getting unknown image flag when creating a deployment using minikube on windows 10 cmd. Why?

C:WINDOWSsystem32>minikube kubectl create deployment nginxdepl --image=nginx
Error: unknown flag: --image
See 'minikube kubectl --help' for usage.

C:WINDOWSsystem32>

2

Answers


  1. there problem is your command. you are mixing kubectl and minikube.

    minikube is for managing your one-node local dev cluster.
    kubectl is used for interacting with your cluster.

    you should be using the following command:

    kubectl create deployment nginxdepl --image nginx
    
    Login or Signup to reply.
  2. When using kubectl bundled with minikube the command is little different.

    From the documentation, your command should be:

    minikube kubectl -- create deployment nginxdepl --image=nginx
    

    The difference is the -- right after kubectl

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search