Halaman ini menunjukkan cara menyelesaikan masalah terkait penyedia DNS di cluster Google Kubernetes Engine (GKE).
Jika Anda memerlukan bantuan lainnya, hubungi Cloud Customer Care.Peristiwa Cloud DNS untuk GKE
Bagian ini menjelaskan masalah umum Cloud DNS di GKE.
Cloud DNS dinonaktifkan
Peristiwa berikut terjadi saat Cloud DNS API dinonaktifkan:
Warning FailedPrecondition service/default-http-backend
Failed to send requests to Cloud DNS: Cloud DNS API Disabled. Please enable the Cloud DNS API in your project PROJECT_NAME: Cloud DNS API has not been used in project PROJECT_NUMBER before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dns.googleapis.com/overview?project=PROJECT_NUMBER then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Error ini terjadi karena Cloud DNS API tidak diaktifkan secara default. Anda harus mengaktifkan Cloud DNS API secara manual.
Untuk mengatasi masalah ini, aktifkan Cloud DNS API.
Gagal mengirim permintaan ke Cloud DNS: Batas kapasitas API terlampaui.
Peristiwa berikut terjadi saat project telah melampaui kuota atau batas Cloud DNS:
kube-system 27s Warning InsufficientQuota
managedzone/gke-cluster-quota-ee1bd2ca-dns Failed to send requests to Cloud DNS: API rate limit exceeded. Contact Google Cloud support team to request a quota increase for your project PROJECT_NAME: Quota exceeded for quota metric 'Write requests' and limit 'Write limit for a minute for a region' of service 'dns.googleapis.com' for consumer 'project_number:PROJECT_NUMBER.
Untuk mengatasi masalah ini, tinjau kuota Cloud DNS serta kuota dan batasan Compute Engine. Anda dapat menambah kuota menggunakan Konsol Google Cloud.
Gagal mengirim permintaan ke Cloud DNS karena error sebelumnya
Peristiwa berikut terjadi saat error menyebabkan kegagalan beruntun:
kube-system 27s Warning InsufficientQuota
managedzone/gke-cluster-quota-ee1bd2ca-dns Failed to send requests to Cloud DNS: API rate limit exceeded. Contact Google Cloud support team to request a quota increase for your project PROJECT_NAME: Quota exceeded for quota metric 'Write requests' and limit 'Write limit for a minute for a region' of service 'dns.googleapis.com' for consumer 'project_number:PROJECT_NUMBER.
kube-system 27s Warning FailedPrecondition service/default-http-backend Failed to send requests to Cloud DNS due to a previous error. Please check the cluster events.
Untuk mengatasi masalah ini, periksa peristiwa cluster untuk menemukan sumber error asli, dan ikuti petunjuk untuk menyelesaikan masalah utama tersebut.
Pada contoh sebelumnya, error InsufficientQuota
untuk kegagalan beruntun
yang dipicu zona terkelola. Error kedua untuk FailedPrecondition
menunjukkan bahwa error sebelumnya telah terjadi, yaitu masalah kuota awal
tidak mencukupi. Untuk mengatasi contoh masalah ini, Anda harus mengikuti panduan untuk error kuota Cloud DNS.
Gagal mengikat kebijakan respons
Peristiwa berikut terjadi saat kebijakan respons terikat ke jaringan cluster dan Cloud DNS untuk GKE mencoba mengikat kebijakan respons ke jaringan:
kube-system 9s Warning FailedPrecondition responsepolicy/gke-2949673445-rp
Failed to bind response policy gke-2949673445-rp to test. Please verify that another Response Policy is not already associated with the network: Network 'https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/global/networks/NETWORK_NAME' cannot be bound to this response policy because it is already bound to another response policy.
kube-system 9s Warning FailedPrecondition service/kube-dns
Failed to send requests to Cloud DNS due to a previous error. Please check the cluster events.
Untuk mengatasi masalah ini, selesaikan langkah-langkah berikut:
Dapatkan kebijakan respons yang terikat ke jaringan:
gcloud dns response-policies list --filter='networks.networkUrl: NETWORK_URL'
Ganti
NETWORK_URL
dengan URL jaringan dari error, sepertihttps://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/networks/NETWORK_NAME
.Jika output kosong, kebijakan respons mungkin tidak berada dalam project yang sama. Lanjutkan ke langkah berikutnya untuk menelusuri kebijakan respons.
Jika output mirip dengan berikut ini, lanjutkan ke langkah 4 untuk menghapus kebijakan respons.
[ { "description": "Response Policy for GKE cluster \"CLUSTER_NAME\" with cluster suffix \"cluster.local.\" in project \"PROJECT_ID\" with scope \"CLUSTER_SCOPE\".", ... "kind": "dns#responsePolicy", "responsePolicyName": "gke-CLUSTER_NAME-POLICY_ID-rp" } ]
Dapatkan daftar project dengan izin
dns.networks.bindDNSResponsePolicy
menggunakan IAM Policy Analyzer.Periksa apakah setiap project memiliki kebijakan respons yang terikat ke jaringan:
gcloud dns response-policies list --filter='networks.networkUrl:NETWORK_URL' \ --project=PROJECT_NAME
Langkah selanjutnya
Untuk mengetahui informasi umum tentang mendiagnosis masalah DNS Kubernetes, lihat Men-debug Resolusi DNS.
Untuk membantu mendiagnosis masalah Cloud DNS, Anda dapat mengaktifkan Logging Cloud DNS dan meninjau dokumen pemecahan masalah Cloud DNS.
- Jika Anda memerlukan bantuan lainnya, hubungi Cloud Customer Care.