Skip to content

Commit a0db6b5

Browse files
committed
refine steps
1 parent 92080b8 commit a0db6b5

File tree

1 file changed

+12
-10
lines changed
  • src/content/docs/cloudflare-one/connections/connect-networks/deployment-guides

1 file changed

+12
-10
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/deployment-guides/kubernetes.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ To create a new Kubernetes cluster in Google Cloud:
4747
4. Select **Authorize**.
4848
5. Press Enter to run the pre-populated `gcloud` command.
4949
6. (Recommended) In the Cloud Shell menu, select **Open Editor** to launch the built-in IDE.
50-
7. Run the following command to check the cluster status:
50+
7. In the Cloud Shell terminal, run the following command to check the cluster status:
5151
```sh
5252
kubectl get all
5353
```
@@ -145,6 +145,8 @@ A pod represents an instance of a running process in the cluster. In this exampl
145145

146146
## 3. Create a tunnel
147147

148+
To create a Cloudflare Tunnel:
149+
148150
1. Open a new browser tab and log in to [Zero Trust](https://one.dash.cloudflare.com).
149151

150152
2. Go to **Networks** > **Tunnels**.
@@ -153,7 +155,7 @@ A pod represents an instance of a running process in the cluster. In this exampl
153155

154156
4. Choose **Cloudflared** for the connector type and select **Next**.
155157

156-
5. Enter a name for your tunnel (for example, `gke`).
158+
5. Enter a name for your tunnel (for example, `gke-tunnel`).
157159

158160
6. Select **Save tunnel**.
159161

@@ -167,7 +169,7 @@ Leave the Cloudflare Tunnel browser tab open while we focus on the Kubernetes de
167169

168170
## 4. Store the tunnel token
169171

170-
Create a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/) that contains the tunnel token. The tunnel token must be encoded as a base64-encoded string before it can be stored in the secret. The encoding is not meant to protect the token from being read but to allow for the safe handling of binary data within Kubernetes.
172+
`cloudflared` uses a tunnel token to run a remotely-managed Cloudflare Tunnel. You can store the tunnel token in a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/), which requires data to be encoded as a base64-encoded string. The encoding is not meant to protect the token from being read but to allow for the safe handling of binary data within Kubernetes.
171173

172174
1. Convert the tunnel token into base64 format:
173175

@@ -211,6 +213,8 @@ Create a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/s
211213

212214
## 5. Create pods for cloudflared
213215

216+
To run the Cloudflare Tunnel in Kubernetes:
217+
214218
1. Create a Kubernetes deployment for a remotely-managed Cloudflare Tunnel:
215219

216220
```yaml title="tunnel.yaml"
@@ -244,7 +248,7 @@ Create a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/s
244248
name: tunnel-token
245249
key: token
246250
command:
247-
# Pay attention to the order of commands. For example, --loglevel, --no-autoupdate, and --metrics come before the "run" command, while --token comes after the "run" command.
251+
# Parameters must be in the correct order relative to the "run" command.
248252
- cloudflared
249253
- tunnel
250254
- --no-autoupdate
@@ -301,7 +305,7 @@ Create a [Kubernetes secret](https://kubernetes.io/docs/concepts/configuration/s
301305
replicaset.apps/httpbin-deployment-bc6689c5d 2 2 2 3m37s
302306
```
303307

304-
You should see two `cloudflared` pods and two `httpbin` pods with a `Running` status. If your `cloudflared` pods keep restarting, make sure that your `cloudflared` [parameters](/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters/) are in the correct position relative to the `run` command.
308+
You should see two `cloudflared` pods and two `httpbin` pods with a `Running` status. If your `cloudflared` pods keep restarting, make sure that your `cloudflared` [run parameters](/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters/) are in the correct order. In the example above, `--loglevel`, `--no-autoupdate`, and `--metrics` should come before the `run` command, while `--token` comes after the `run` command.
305309

306310
## 6. Verify tunnel status
307311

@@ -322,19 +326,17 @@ kubectl logs pod/cloudflared-deployment-6d5f9f9666-85l5w
322326
...
323327
```
324328

325-
You can also verify the connection status in the Zero Trust dashboard.
326-
327329
## 7. Add a tunnel route
328330

329331
Now that the tunnel is up and running, we can use the Zero Trust dashboard to route the httpbin service through the tunnel.
330332

331333
1. Switch to the browser tab where you were configuring Cloudflare Tunnel.
332334

333-
2. Go to the **Route tunnel** step and select the **Public hostnames** tab.
335+
2. Go to the **Route tunnel** step.
334336

335-
3. Enter a hostname for the application (for example, `httpbin.<your-domain>.com`).
337+
3. In the **Public hostnames** tab, enter a hostname for the application (for example, `httpbin.<your-domain>.com`).
336338

337-
4. Under **Service**, enter `http://httpbin-service`
339+
4. Under **Service**, enter `http://httpbin-service`. `httpbin-service` is the name of the Kubernetes service defined in `httpbinsvc.yaml`.
338340

339341
5. Select **Complete setup**.
340342

0 commit comments

Comments
 (0)