Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Jika Anda mengalami izin RBAC atau masalah pengikatan, verifikasi bahwa aws-batch
Kubernetes Peran dapat mengakses Kubernetes namespace:
$
kubectl get namespace
namespace
--as=aws-batch
$
kubectl auth can-i get ns --as=aws-batch
Anda juga dapat menggunakan kubectl describe
perintah untuk melihat otorisasi untuk peran cluster atau Kubernetes namespace.
$
kubectl describe clusterrole
aws-batch-cluster-role
Berikut ini adalah output contoh.
Name: aws-batch-cluster-role
Labels: <none>
Annotations: <none>
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
configmaps [] [] [get list watch]
nodes [] [] [get list watch]
pods [] [] [get list watch]
daemonsets.apps [] [] [get list watch]
deployments.apps [] [] [get list watch]
replicasets.apps [] [] [get list watch]
statefulsets.apps [] [] [get list watch]
clusterrolebindings.rbac.authorization.k8s.io [] [] [get list]
clusterroles.rbac.authorization.k8s.io [] [] [get list]
namespaces [] [] [get]
events [] [] [list]
$
kubectl describe role
aws-batch-compute-environment-role
-nmy-aws-batch-namespace
Berikut ini adalah output contoh.
Name: aws-batch-compute-environment-role
Labels: <none>
Annotations: <none>
PolicyRule:
Resources Non-Resource URLs Resource Names Verbs
--------- ----------------- -------------- -----
pods [] [] [create get list watch delete patch]
serviceaccounts [] [] [get list]
rolebindings.rbac.authorization.k8s.io [] [] [get list]
roles.rbac.authorization.k8s.io [] [] [get list]
Untuk mengatasi masalah ini, terapkan kembali izin dan perintah RBAC. rolebinding
Untuk informasi selengkapnya, lihat Siapkan cluster Amazon EKS Anda untuk AWS Batch.