You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a simple demonstration of TCP communication tunneled through a Skupper network from a private to a public namespace and back again. We will set up a Skupper network between the two namespaces, start a TCP echo-server on the public namespace, then communicate to it from the private namespace, and receive its replies. We will assume that Kubernetes is running on your local machine, and we will create and access both namespaces from within a single shell.
3
+
This is a simple demonstration of TCP communication tunneled through a Skupper network from a private to a public namespace and back again. We will use two namespaces for simplicity of setup, but this would work the same way on two separate clusters.
4
+
<br/>
5
+
We will set up a Skupper network between the two namespaces, start a TCP echo-server on the public namespace, then communicate to it from the private namespace, and receive its replies. We will assume that Kubernetes is running on your local machine, and we will create and access both namespaces from within a single shell.
4
6
5
7
*[Prerequisites](#prereq)
6
8
*[Step 1: Set up the demo.](#step_1)
@@ -14,7 +16,10 @@ This is a simple demonstration of TCP communication tunneled through a Skupper n
14
16
15
17
## Prerequisites <aname="prereq"></a>
16
18
17
-
You will need the skupper command line tool installed, and on your executable path.
19
+
* The `kubectl` command-line tool, version 1.15 or later ([installation guide](https://kubernetes.io/docs/tasks/tools/install-kubectl/))
20
+
* The `skupper` command-line tool, the latest version ([installation guide](https://skupper.io/start/index.html#step-1-install-the-skupper-command-line-tool-in-your-environment))
21
+
* Two Kubernetes namespaces, from any providers you choose, on any clusters you choose
22
+
18
23
19
24
20
25
@@ -32,73 +37,43 @@ On your machine make a directory for this tutorial, clone the tutorial repo, and
32
37
## Step 2: Start your cluster and define two namespaces. <aname="step_2"></a>
33
38
34
39
```
35
-
$ alias kc='kubectl'
36
-
$ oc cluster up
37
-
$ oc new-project public
38
-
Now using project "public" on server "https://127.0.0.1:8443".
39
-
...
40
-
$ oc new-project private
41
-
Now using project "private" on server "https://127.0.0.1:8443".
42
-
...
40
+
alias kc='kubectl'
41
+
oc cluster up
42
+
oc new-project public
43
+
oc new-project private
43
44
```
44
45
45
46
## Step 3: Start Skupper in the public namespace. <aname="step_3"></a>
... just wait a few seconds and re-issue the command.
88
-
89
-
90
69
91
70
## Step 6: Make the connection. <aname="step_6"></a>
92
71
93
72
After issuing the connect command, a new service will show up in this namespace called tcp-go-echo. (It may take as long as two minutes for the service to appear.)
@@ -107,7 +82,10 @@ After issuing the connect command, a new service will show up in this namespace
107
82
Using the IP address and port number from the 'kc get svc' result, send a message to the local service. Skupper will route the message to the service that is running on the other namespace, and will route the reply back here.
108
83
109
84
```
110
-
ncat Mr. Watson, come here. I want to see you.
85
+
ADDR=`kubectl get svc/tcp-go-echo -o=jsonpath='{.spec.clusterIP}'`
86
+
PORT=`kubectl get svc/tcp-go-echo -o=jsonpath='{.spec.ports[0].port}'`
87
+
telnet ${ADDR} ${PORT}
88
+
Mr. Watson, come here. I want to see you.
111
89
tcp-go-echo-67c875768f-kt6dc : MR. WATSON, COME HERE. I WANT TO SEE YOU.
112
90
```
113
91
@@ -127,18 +105,12 @@ We demonstrated this using two namespaces in a single local cluster for ease of
127
105
Let's tidy up so no one trips over any of this stuff later. In the private namespace, delete the Skupper artifacts. In public, delete both Kubernetes and Skupper atrifacts.
0 commit comments