所以我更新了清单,并将apiVersion:extensions/v1 beta1替换为apiVersion:apps/v1
apiVersion: apps/v1
kind: Deployment
metadata:
name: secretmanager
namespace: kube-system
spec:
selector:
matchLabels:
app: secretmanager
template:
metadata:
labels:
app: secretmanager
spec:
...
字符串
然后,我应用了更改
k apply -f deployment.yaml
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
deployment.apps/secretmanager configured
型
我也试
k replace --force -f deployment.yaml
型
这重新创建了POD(downtime:()),但如果您尝试输出部署的yaml配置,我仍然会看到旧值
k get deployments -n kube-system secretmanager -o yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"Deployment",
"metadata":{"annotations":{},"name":"secretmanager","namespace":"kube-system"}....}
creationTimestamp: "2020-08-21T21:43:21Z"
generation: 2
name: secretmanager
namespace: kube-system
resourceVersion: "99352965"
selfLink: /apis/extensions/v1beta1/namespaces/kube-system/deployments/secretmanager
uid: 3d49aeb5-08a0-47c8-aac8-78da98d4c342
spec:
型
所以我仍然看到这个apiVersion:extensions/v1 beta1
我做错了什么?
我正在准备将eks kubernetes v1.15迁移到v1.16
1条答案
按热度按时间rsaldnfx1#
Deployment
存在于多个apiGroup中,因此它是不明确的。尝试指定例如apps/v1
:字符串
你应该看到你的
Deployment
,但与apps/v1
apiGroup。