Skip to content

Commit

Permalink
MG-198 - Add post-deployment guide for k8s (#199)
Browse files Browse the repository at this point in the history
* Updated cli usage command

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Updated cli usage

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Renamed mainflux to magistrala

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Start ignoring config.toml

* Removed config.toml file

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Start ignoring config.toml

* Renamed mainflux to magistrala

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Fixed URLs

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Fixed URLs

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Fixed Typos

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Reverted changes to events.md

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Reverted changes to events.md

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Rename MF_ to MG_

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Add K8s post-deployment guide to README

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* update docs

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Add postman collection

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Add postman collection

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* revert CODEOWNERS

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* revert CODEOWNERS

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

* Add link to CLI docs

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>

---------

Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
  • Loading branch information
JeffMboya authored Sep 24, 2024
1 parent 9f110eb commit a5dc6e9
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion docs/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,65 @@ kubectl get services -n mg
kubectl logs <pod-name> -n mg
```

---
### Interacting with Magistrala Services After Deployment

Once you have successfully deployed Magistrala, there are three primary ways you can interact with its services:

- web-based User Interface (UI)
- Magistrala CLI tool (learn more in the [CLI Documentation](https://docs.magistrala.abstractmachines.fr/cli/))
- HTTP API Clients (e.g., cURL, Postman)

The ingress-nginx-controller handles the routing for your deployed services using Kubernetes Ingress resources. To interact with your Magistrala UI or any other service exposed through this load balancer, the first step is to retrieve the Public IP address of this load balancer.

You can usually find this IP address in your DigitalOcean dashboard under the "Networking" or "Load Balancers" section, or by using the following command in your terminal:

kubectl get svc -A | grep LoadBalancer

This command searches all namespaces for services of type `LoadBalancer`. The output looks something like this:

ingress-nginx ingress-nginx-controller LoadBalancer 10.245.192.202 138.68.126.8 80:30424/TCP,443:31752/TCP 64d

NOTE: The Public IP in this case is `138.68.126.8`.

#### Using the Web-Based UI

- Once you have the Public IP address, open your web browser.
- In the address bar, enter the IP address followed by `/ui/login` as shown below:

http://138.68.126.8/ui/login

#### Using Postman

If you prefer working with APIs, you can also interact with Magistrala services using Postman by sending requests to the Public IP address of your load balancer. For example, to create a user:

###### 1. Set Up the Postman Request

- **Method:** `POST`
- **URL:** `http://138.68.126.8/users`

This URL points to the endpoint that handles user creation on your Magistrala deployment. Replace `138.68.126.8` with the actual IP address or domain of your deployment if it differs.

###### 2. Set Up the Request Body

Switch to the `Body` tab in Postman and select `raw` as the format. Choose `JSON` from the dropdown menu, and then enter the following JSON structure in the text area:

```json
{
"name": "user1",
"tags": ["tag1", "tag2"],
"credentials": {
"identity": "user1@email.com",
"secret": "12345678"
},
"metadata": {
"domain": "domain1"
}
}
```

`Send` the request. If successful, the server will respond with the details of the newly created user.

For more examples, refer to this [Postman Collection](https://elements.getpostman.com/redirect?entityId=38532610-ef9a0562-b353-4d2c-8aca-a5fae35ad0ad&entityType=collection).

## Install Magistrala Charts (From Published Helm Repository)

Expand Down

0 comments on commit a5dc6e9

Please sign in to comment.