What is the "--" used with kubectl when running with minikube on Ubuntu?

1/4/2021

I've been playing around with minikube on Ubuntu when I realized for any commands with options (e.g. -o yaml) to work, I need to do:

kubectl -- get pod my_test_pod -o yaml

while on Mac OS, I can simply do:

kubectl get pod my_test_pod -o yaml

I know on Linux, "--" means the end of options and whatever follows is treated as a param string. But I cannot understand why it is used here. Anyone can shed some light?

Thanks!

-- peidaqi
kubernetes
minikube

0 Answers