Merge pull request #4456 from DrFaust92/gke-docs

docs: lint gke docs + make terraform config more secure
This commit is contained in:
Kubernetes Prow Robot 2024-05-13 00:19:45 -07:00 committed by GitHub
commit 551ee96c23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ More often, following best practices in regards to security and operations, Clou
ExternalDNS will need permissions to make changes to the Cloud DNS zone. There are three ways to configure the access needed:
* [Worker Node Service Account](#worker-node-service-account)
* [Worker Node Service Account](#worker-node-service-account-method)
* [Static Credentials](#static-credentials)
* [Workload Identity](#workload-identity)
@ -181,8 +181,6 @@ You have an option to chose from using the gcloud CLI or using Terraform.
* `ns/external-dns` with `ns/<your namespace`
* `sa/external-dns` with `sa/<your ksa>`
=== "Terraform"
The below instructions assume you are using the default Kubernetes Service account name of `external-dns` in the namespace `external-dns`
@ -219,7 +217,14 @@ You have an option to chose from using the gcloud CLI or using Terraform.
resource "google_project_iam_member" "external_dns" {
member = local.member
project = "DNS-PROJECT"
role = "roles/dns.admin"
role = "roles/dns.reader"
}
resource "google_dns_managed_zone_iam_member" "member" {
project = "DNS-PROJECT"
managed_zone = "ZONE-NAME"
role = "roles/dns.admin"
member = local.member
}
```
@ -233,9 +238,6 @@ You have an option to chose from using the gcloud CLI or using Terraform.
* `variable "ksa_name"` : Name of the Kubernetes service account external-dns will use
* `variable "kns_name"` : Name of the Kubernetes Name Space that will have external-dns installed to
### Worker Node Service Account method
In this method, the GSA (Google Service Account) that is associated with GKE worker nodes will be configured to have access to Cloud DNS.
@ -292,7 +294,6 @@ kubectl create secret generic "external-dns" --namespace ${EXTERNALDNS_NS:-"defa
After this, follow the steps in [Deploy ExternalDNS](#deploy-externaldns). Make sure to set the `--google-project` flag to match Cloud DNS project name. Make sure to uncomment out the section that mounts the secret to the ExternalDNS pods.
#### Deploy External DNS
Deploy ExternalDNS with the following steps below, documented under [Deploy ExternalDNS](#deploy-externaldns). Set the `--google-project` flag to the Cloud DNS project name.