xet*_*a11 22 kubernetes kubernetes-custom-resources
我最近应用了这个 CRD 文件
https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml
Run Code Online (Sandbox Code Playgroud)
随着kubectl apply
安装此:https://hub.helm.sh/charts/jetstack/cert-manager
我想我成功地应用了它:
xetra11@x11-work configuration]$ kubectl apply -f ./helm-charts/certificates/00-crds.yaml --validate=false
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
Run Code Online (Sandbox Code Playgroud)
但是现在我想“看看”我刚刚在这里应用的内容。我不知道如何列出这些定义,或者例如删除它们,如果我认为它们会以某种方式搞砸我的集群。
我在这里找不到任何信息:https : //kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#preparing-to-install-a-custom-resource
小智 27
kubectl get customresourcedefinitions
,或kubectl get crd
。
然后,您可以使用kubectl describe crd <crd_name>
来获取 CRD 的描述。当然kubectl get crd <crd_name> -o yaml
还有获得 CRD 的完整定义。
要删除,您可以使用kubectl delete crd <crd_name>
.
小智 10
自定义资源与任何其他本机 Kubernetes 资源一样。
所有基本的 kubeclt CRUD 操作都适用于 CRD。因此,只需使用以下任何命令即可。
kubectl get crd <name of crd>
kubectl describe crd <name of crd>
kubectl get crd <name of crd> -o yaml
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16408 次 |
最近记录: |