Skip to content

Commit

Permalink
Merge pull request #4456 from DrFaust92/gke-docs
Browse files Browse the repository at this point in the history
docs: lint gke docs + make terraform config more secure
  • Loading branch information
k8s-ci-robot committed May 13, 2024
2 parents d422e39 + 113b775 commit 551ee96
Showing 1 changed file with 9 additions and 8 deletions.
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

0 comments on commit 551ee96

Please sign in to comment.