Skip to content

Commit 82f6c62

Browse files
committed
add a summary and a bit more context
Signed-off-by: Matthew Fisher <[email protected]>
1 parent 38b4bdc commit 82f6c62

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

content/en/docs/topics/routing.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ description: Learn how to connect to your application.
44
weight: 13
55
---
66

7+
This topic guide shows you how to connect to your application deployed to SpinKube, including how to
8+
use port-forwarding for local development, or Ingress rules for a production setup.
9+
710
## Run the sample application
811

912
Let's deploy a sample application to your Kubernetes cluster. We will use this application
@@ -16,12 +19,29 @@ yet.
1619
kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/samples/simple.yaml
1720
```
1821

22+
When SpinKube deploys the application, it creates a Kubernetes Service that exposes the application
23+
to the cluster. You can check the status of the deployment with the following command:
24+
25+
```shell
26+
kubectl get services
27+
```
28+
29+
You should see a service named `simple-spinapp` with a type of `ClusterIP`. This means that the
30+
service is only accessible from within the cluster.
31+
32+
```shell
33+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
34+
simple-spinapp ClusterIP 10.43.152.184 <none> 80/TCP 1m
35+
```
36+
37+
We will use this service to connect to your application.
38+
1939
## Port forwarding
2040

2141
This option is useful for debugging and development. It allows you to forward a local port to the
22-
application.
42+
service.
2343

24-
Forward port 8083 to the application so that it can be reached from your computer:
44+
Forward port 8083 to the service so that it can be reached from your computer:
2545

2646
```shell
2747
kubectl port-forward svc/simple-spinapp 8083:80
@@ -35,6 +55,10 @@ curl http://localhost:8083
3555

3656
You should see a message like "Hello world from Spin!".
3757

58+
This is one of the simplest ways to test your application. However, it is not suitable for
59+
production use. The next section will show you how to expose your application to the internet using
60+
an Ingress controller.
61+
3862
## Ingress
3963

4064
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.

0 commit comments

Comments
 (0)