$ kubectl api-resources | grep deployment deployments deploy apps true Deployment
This means that only apiVersion with apps is correct for Deployments (extensions is not supporting Deployment). The same situation with StatefulSet.
这意味着只有 apiVersion withapps对 Deployments 是正确的(extensions不支持Deployment)。与 StatefulSet 的情况相同。
您需要将 Deployment 和 StatefulSet apiVersion 更改为apiVersion: apps/v1
