Skip to content

Commit 8080a8f

Browse files
committed
Use port forward to access the SDK API
1 parent d027956 commit 8080a8f

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/reference/replicated-sdk-apis.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ For example, if your application includes a UI where users manage their applicat
66

77
For more information about how to get started with the Replicated SDK, see [About the Replicated SDK (Beta)](/vendor/replicated-sdk-overview).
88

9-
## Access the SDK API
9+
## Use Port Forwarding to Access the SDK API
1010

11-
The Replicated SDK API is available after the Replicated SDK is installed and initialized in a cluster. For information about installing the SDK, see [Installing with Helm](/vendor/install-with-helm).
11+
After the Replicated SDK is installed and initialized in a cluster, the Replicated SDK API is exposed at `replicated:3000`. You can access the SDK API for testing by forwarding port 3000 to your local machine.
1212

13-
After the SDK is installed, the Replicated SDK API service is exposed at `replicated:3000`. To verify where the Replicated SDK API service is exposed, you can run `kubectl get service -A`.
13+
To use port forwarding to access the SDK API:
14+
15+
1. Install the SDK in your cluster. See [Installing the Replicated SDK](/vendor/replicated-sdk-installing).
16+
17+
1. Run the following command to port forward to the SDK API service:
18+
19+
```bash
20+
kubectl port-forward service/replicated 3000
21+
```
22+
23+
1. Interact with the SDK API endpoints as desired using the port forward. For example:
24+
25+
```bash
26+
curl localhost:3000/api/v1/license/fields/expires_at
27+
curl localhost:3000/api/v1/license/fields/{field}
28+
```
1429

1530
## app
1631

0 commit comments

Comments
 (0)