admin管理员组文章数量:1123925
In a Dev OpenShift sandbox I have the following kubernetes resources:
NAME READY STATUS RESTARTS AGE pod/workspace036c85e5c44e4207-697d66f7c4-jbwcp 2/2 Running 0 20m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/modelmesh-serving ClusterIP None <none> 8033/TCP,8008/TCP,8443/TCP,2112/TCP 17s
service/workspace036c85e5c44e4207-service ClusterIP 172.30.250.95 <none> 4444/TCP 2m40s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/workspace036c85e5c44e4207 1/1 1 1 20m
NAME DESIRED CURRENT READY AGE
replicaset.apps/workspace036c85e5c44e4207-697d66f7c4 1 1 1 20m
When I try to delete the deployment using the following command
kubectl delete deployment workspace036c85e5c44e4207
the deployment gets recreated. How can I delete a deployment that has a Recreate update strategy?
In a Dev OpenShift sandbox I have the following kubernetes resources:
NAME READY STATUS RESTARTS AGE pod/workspace036c85e5c44e4207-697d66f7c4-jbwcp 2/2 Running 0 20m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/modelmesh-serving ClusterIP None <none> 8033/TCP,8008/TCP,8443/TCP,2112/TCP 17s
service/workspace036c85e5c44e4207-service ClusterIP 172.30.250.95 <none> 4444/TCP 2m40s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/workspace036c85e5c44e4207 1/1 1 1 20m
NAME DESIRED CURRENT READY AGE
replicaset.apps/workspace036c85e5c44e4207-697d66f7c4 1 1 1 20m
When I try to delete the deployment using the following command
kubectl delete deployment workspace036c85e5c44e4207
the deployment gets recreated. How can I delete a deployment that has a Recreate update strategy?
Share Improve this question edited 21 hours ago Broken_Window 2,0933 gold badges23 silver badges47 bronze badges asked yesterday Mohammad JumahMohammad Jumah 11 bronze badge New contributor Mohammad Jumah is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0Please check the devworkspace first
$ oc get devworkspace
If found, delete the DevWorkspace resource instead of the deployment directly
$ oc delete devworkspace <workspace-name>
Please check the potential parent resources
$ oc get all -l component=workspace036c85e5c44e4207
Also, please share the below files further discussion
$ oc get deployment workspace036c85e5c44e4207 -o yaml | grep -A 5 ownerReferences
$ oc get events --sort-by='.lastTimestamp' | grep workspace036c85e5c44e4207
Dr Vivek Yoganand, #openshift +9197864365245
本文标签: kubectlDeleting an OpenShift deployment with a Recreate Update strategyStack Overflow
版权声明:本文标题:kubectl - Deleting an OpenShift deployment with a Recreate Update strategy - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736608915a1945393.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论