kubernetes - 即使删除了命名空间,CRD 也不会被删除

标签 kubernetes namespaces kubernetes-custom-resources

我在某些命名空间中有附加的 CRD。我的问题是,即使删除了它所在的命名空间,CRD 仍然存在!

> oc project
error: the project "uhc-development-15o4llu96oe7rftq8nms5t99djl3cnmh" specified in your config does not exist.

请注意,CRD 上没有细化剂:
> oc get accountclaim managed-test2005 -o yaml
apiVersion: aws.managed.openshift.io/v1alpha1
kind: AccountClaim
metadata:
  creationTimestamp: 2019-05-20T12:38:35Z
  generation: 1
  labels:
    api.openshift.com/id: 15o4llu96oe7rftq8nms5t99djl3cnmh
    api.openshift.com/name: managed-test2005
  name: managed-test2005
  namespace: uhc-development-15o4llu96oe7rftq8nms5t99djl3cnmh
  resourceVersion: "13051561"
  selfLink: /apis/aws.managed.openshift.io/v1alpha1/namespaces/uhc-development-15o4llu96oe7rftq8nms5t99djl3cnmh/accountclaims/managed-test2005
  uid: 2f719fc0-7afc-11e9-964f-001a4a162604
spec:
  accountLink: ""
  aws:
    regions:
    - name: us-east-1
  awsCredentialSecret:
    name: aws
    namespace: uhc-development-15o4llu96oe7rftq8nms5t99djl3cnmh
  legalEntity:
    id: 0
    name: 
status:
  conditions:
  - lastProbeTime: 2019-05-20T12:38:35Z
    lastTransitionTime: 2019-05-20T12:38:35Z
    message: Attempting to claim account
    reason: AccountClaimed
    status: "True"
    type: Unclaimed
  state: Ready

有没有人遇到过这个问题?任何帮助都感激不尽。

最佳答案

在黑暗中拍摄......如果你能够获得 CRD 本身 - 那么它可能会有一些终结器来阻止它被删除。如果您编辑 crd 并删除那些终结器,您可能会发现 CRD 将被删除。

关于kubernetes - 即使删除了命名空间,CRD 也不会被删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56232522/

相关文章:

wpf - ViewModel 位置到子文件夹(XAML,命名空间)

kubernetes - 我可以暂停 kubectl apply 上的类型检查吗?

Kubernetes:扩展状态子资源是否需要新的 API 版本?

kubernetes - GKE更新calico-node-vertical-autoscaler镜像版本

azure - Kubernetes:AKS 无法查看该站点

用于特定 pod 日志的 Kubernetes go 客户端 api

c# - <url> 的前缀 “cannot be redefined from ” 在同一个开始元素标签内

ubuntu - 准备 VPS 以使用 Kubespray 安装 Kubernetes

Laravel 看不到自定义请求类的文件路径,如何解决?

kubernetes - Quarkus Kubernetes 运算符 : how to set environment variables in application container (not operator container)?