Skip to content

Commit 388986e

Browse files
Verify and update the GKE tutorial
- Changed the environment variable names to match the gcloud CLI defaults. - Use a single-zone cluster, to avoid nodes in every zone. - Use a small machine type, to reduce costs. Signed-off-by: Richard Wall <[email protected]>
1 parent e516738 commit 388986e

File tree

1 file changed

+15
-10
lines changed
  • content/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl

1 file changed

+15
-10
lines changed

content/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl/README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy cert-manager on Google Kubernetes Engine (GKE) and create SSL cert
33
description: Learn how to deploy cert-manager on Google Kubernetes (GKE) Engine and then configure it to sign SSL certificates using Let's Encrypt
44
---
55

6-
*Last Verified: 15 July 2022*
6+
*Last Verified: 6 June 2025*
77

88
In this tutorial you will learn how to deploy and configure cert-manager on Google Kubernetes Engine (GKE).
99
You will learn how to configure cert-manager to get a signed SSL certificate from Let's Encrypt,
@@ -84,22 +84,27 @@ or (2) export the variable in your shell session. This applies to all environmen
8484
We will go with option (2), so we need to export the environment variables before continuing using the information that was printed by `gcloud init`:
8585

8686
```bash
87-
export PROJECT=your-project # Your Google Cloud project ID.
88-
export REGION=europe-west1 # Your Google Cloud region.
87+
export CLOUDSDK_CORE_PROJECT=your-project # Your Google Cloud project ID.
88+
export CLOUDSDK_COMPUTE_ZONE=europe-west2-b # Your Google Cloud zone
8989
```
9090

91+
> 📖 Learn more about [Setting configuration properties in the gcloud CLI](https://cloud.google.com/sdk/docs/configurations#setting_configuration_properties).
92+
9193
## 1. Create a Kubernetes Cluster
9294

9395
To get started, let's create a Kubernetes cluster in Google Cloud. You will need to pick a name for your cluster. Here, we will go with "test-cluster-1". Let us save it in an environment variable:
9496

9597
```bash
96-
export CLUSTER=test-cluster-1
98+
export CLOUDSDK_CONTAINER_CLUSTER=test-cluster-1
9799
```
98100

99101
Now, create the cluster using the following command:
100102

101103
```bash
102-
gcloud container clusters create $CLUSTER --preemptible --num-nodes=1
104+
gcloud container clusters create $CLOUDSDK_CONTAINER_CLUSTER \
105+
--preemptible \
106+
--machine-type e2-small \
107+
--num-nodes=1
103108
```
104109

105110
Set up the [Google Kubernetes Engine auth plugin for kubectl](https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke):
@@ -119,9 +124,9 @@ kubectl get nodes -o wide
119124
> ⏲ It will take 4-5 minutes to create the cluster.
120125
>
121126
> 💵 To minimize your cloud bill, this command creates a 1-node cluster using a
122-
> [preemptible virtual
123-
> machine](https://cloud.google.com/kubernetes-engine/docs/how-to/preemptible-vms)
124-
> which is cheaper than a normal virtual machine.
127+
> [preemptible virtual machine](https://cloud.google.com/kubernetes-engine/docs/how-to/preemptible-vms)
128+
> which is cheaper than a normal virtual machine,
129+
> and it uses a [cost effective E2 shared-core machine type](https://cloud.google.com/compute/docs/general-purpose-machines#e2-shared-core).
125130
126131
## 2. Deploy a sample web server
127132

@@ -180,7 +185,7 @@ gcloud compute addresses describe web-ip --format='value(address)' --global
180185
Then, copy the output and save it into an environment variable:
181186

182187
```bash
183-
export IP_ADDRESS=198.51.100.1 # Replace with your IP address
188+
export IP_ADDRESS=192.0.2.100 # Replace with your IP address
184189
```
185190

186191
## 4. Create a domain name for your website
@@ -554,7 +559,7 @@ After completing the tutorial you can clean up by deleting the cluster and the d
554559

555560
```bash
556561
# Delete the cluster and all the Google Cloud resources related to the Ingress that it contains
557-
gcloud container clusters delete $CLUSTER
562+
gcloud container clusters delete $CLOUDSDK_CONTAINER_CLUSTER
558563

559564
# Delete the domain name
560565
gcloud dns record-sets delete $DOMAIN_NAME --zone $ZONE --type A

0 commit comments

Comments
 (0)