Why is `--generator=deployment/apps.v1beta1` deprecated in `kubectl run`?

9/22/2019

I saw generators except run-pod/v1 are deprecated in kubectl run. Previously, it was convenient to create deployments without creating a YAML file for testing purposes, wondering why it is deprecated?

-- Dagang
kubernetes

1 Answer

9/22/2019

From the Changelog:

All kubectl run generators have been deprecated except for run-pod/v1. This is part of a move to make kubectl run simpler, enabling it create only pods; if additional resources are needed, you should use kubectl create instead. (#68132, @soltysh)

-- Jamie Counsell
Source: StackOverflow