File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
content/en/docs/tasks/access-application-cluster Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ for database debugging.
158
158
Any of the above commands works. The output is similar to this:
159
159
160
160
```
161
- I0710 14:43:38.274550 3655 portforward.go:225] Forwarding from 127.0.0.1:7000 -> 6379
162
- I0710 14:43:38.274797 3655 portforward.go:225] Forwarding from [::1]:7000 -> 6379
161
+ Forwarding from 127.0.0.1:7000 -> 6379
162
+ Forwarding from [::1]:7000 -> 6379
163
163
```
164
164
165
165
2. Start the Redis command line interface:
@@ -180,7 +180,23 @@ for database debugging.
180
180
PONG
181
181
```
182
182
183
+ ### Optionaly let _kubectl_ choose the local port
183
184
185
+ If you don' t need a specific local port, you can let ` kubectl` choose and allocate
186
+ the local port and thus relieve you from having to manage local port conflicts, with
187
+ the slightly simpler syntax:
188
+
189
+ ` ` ` shell
190
+ kubectl port-forward deployment/redis-master :6379
191
+ ` ` `
192
+
193
+ An allocated local port in the upper range will be displayed as a result, the output
194
+ will be similar to this:
195
+
196
+ ```
197
+ Forwarding from 127.0.0.1:62162 -> 6379
198
+ Forwarding from [ ::1] :62162 -> 6379
199
+ ```
184
200
185
201
186
202
<!-- discussion -->
You can’t perform that action at this time.
0 commit comments