Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: lint gke docs + make terraform config more secure #4456

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions docs/tutorials/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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
}
```

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down