apiVersion: projectcalico.org/v3
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
通過使用kubectl get networkpolicy,我只能看到由創建的策略,networking.k8s.io/v1而不是由創建的策略projectcalico.org/v3。有什么建議如何查看后者?
uj5u.com熱心網友回復:
kubectl get XXX不顯示集群中的所有資源,在你的情況下你看不到 CRD
- 你可以找到你的物件
kubectl get crds - 然后
kubectl get <crd name> -A
在您的情況下,它將是:
# Get all the CRD from the desired type
kubectl get projectcalico.org/v3 -A
# Now grab the desired name and do whatever you want with it
kubectl describe <CRD>/<resource name> -n <namespace>


轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/497055.html
標籤:Kubernetes
