$ 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
