Skip to content

Commit 8133206

Browse files
authored
Merge pull request #2875 from replicatedhq/83415
Use port forward to access the SDK API
2 parents 90e1e97 + e729390 commit 8133206

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

docs/reference/replicated-sdk-apis.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,30 @@ 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+
Forwarding from 127.0.0.1:3000 -> 3000
24+
Forwarding from [::1]:3000 -> 3000
25+
```
26+
27+
1. With the port forward running, test the SDK API endpoints as desired. For example:
28+
29+
```bash
30+
curl localhost:3000/api/v1/license/fields/expires_at
31+
curl localhost:3000/api/v1/license/fields/{field}
32+
```
1433

1534
## app
1635

0 commit comments

Comments
 (0)