You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by rx...@apache.org on 2020/07/30 03:26:45 UTC
[pulsar] 01/02: [docs] Use `minikube service` to expose ports
(#7667)
This is an automated email from the ASF dual-hosted git repository.
rxl pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 3c683a8a2fcf1e9a02e35bbe033ea74f82ce4629
Author: Kristi <kr...@gmail.com>
AuthorDate: Wed Jul 29 20:01:10 2020 -0700
[docs] Use `minikube service` to expose ports (#7667)
### Motivation
I was doing the kubernetes getting started tutorial, and got stuck when trying to connect to the pulsar-mini-proxy service. I realized I needed to run `minikube service pulsar-mini-proxy -n pulsar` in order to expose the service ports outside of minikube.
Environment: OSX Catalina 10.15.3 with minikube v1.12.1 using kubernetes 1.18.3 with docker driver
### Modifications
documentation update for kubernetes getting started tutorial
Co-authored-by: HuanliMeng <48...@users.noreply.github.com>
Co-authored-by: Kristi Tsukida <kt...@quantcast.com>
Co-authored-by: HuanliMeng <48...@users.noreply.github.com>
(cherry picked from commit 3b41dced1e10922f386ad014e020134e90931001)
---
site2/docs/getting-started-helm.md | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/site2/docs/getting-started-helm.md b/site2/docs/getting-started-helm.md
index a381bb7..f34d7bb 100644
--- a/site2/docs/getting-started-helm.md
+++ b/site2/docs/getting-started-helm.md
@@ -192,7 +192,7 @@ We use [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/) i
You can use the Pulsar client to create producers and consumers to produce and consume messages.
-By default, the Pulsar Helm chart exposes the Pulsar cluster through a Kubernetes `LoadBalancer`. In Minikube, you can use the following command to get the IP address of the proxy service.
+By default, the Pulsar Helm chart exposes the Pulsar cluster through a Kubernetes `LoadBalancer`. In Minikube, you can use the following command to check the proxy service.
```bash
kubectl get services -n pulsar | grep pulsar-mini-proxy
@@ -204,19 +204,36 @@ You will see a similar output as below.
pulsar-mini-proxy LoadBalancer 10.97.240.109 <pending> 80:32305/TCP,6650:31816/TCP 28m
```
-This output tells what are the node ports that Pulsar cluster's binary port and HTTP port are exposed to. The port after `80:` is the HTTP port while the port after `6650:` is the binary port.
+This output tells what are the node ports that Pulsar cluster's binary port and HTTP port are mapped to. The port after `80:` is the HTTP port while the port after `6650:` is the binary port.
-Then you can find the IP address of your Minikube server by running the following command.
+Then you can find the IP address and exposed ports of your Minikube server by running the following command.
```bash
-minikube ip
+minikube service pulsar-mini-proxy -n pulsar
```
-At this point, you can get the service URLs to connect to your Pulsar client.
+**Output**
+```bash
+|-----------|-------------------|-------------|-------------------------|
+| NAMESPACE | NAME | TARGET PORT | URL |
+|-----------|-------------------|-------------|-------------------------|
+| pulsar | pulsar-mini-proxy | http/80 | http://172.17.0.4:32305 |
+| | | pulsar/6650 | http://172.17.0.4:31816 |
+|-----------|-------------------|-------------|-------------------------|
+🏃 Starting tunnel for service pulsar-mini-proxy.
+|-----------|-------------------|-------------|------------------------|
+| NAMESPACE | NAME | TARGET PORT | URL |
+|-----------|-------------------|-------------|------------------------|
+| pulsar | pulsar-mini-proxy | | http://127.0.0.1:61853 |
+| | | | http://127.0.0.1:61854 |
+|-----------|-------------------|-------------|------------------------|
+```
+
+At this point, you can get the service URLs to connect to your Pulsar client. Here are URL examples:
```
-webServiceUrl=http://$(minikube ip):<exposed-http-port>/
-brokerServiceUrl=pulsar://$(minikube ip):<exposed-binary-port>/
+webServiceUrl=http://127.0.0.1:61853/
+brokerServiceUrl=pulsar://127.0.0.1:61854/
```
Then you can proceed with the following steps: