Alpha feature
The Postman Insights Agent listens to the traffic arriving at the cluster service you want to monitor and automatically populates your Insights Project with endpoints.
To use the Insights Agent with Kubernetes, complete the following steps. Then, you'll be automatically directed to the Endpoints tab.
To install the Insights Agent, do the following:
Select Insights in the sidebar and select + to create a new Insights Project.
The onboarding workflow displays, listing the installation instructions and supported deployments.
As shown on the Insights onboarding screen, run the following command on your command line:
bash -c "$(curl -L https://releases.observability.postman.com/scripts/install-postman-insights-agent.sh)"
Next, you'll set up the Postman Insights Agent in your Kubernetes environment using kube inject
, and edit the deployment file. For more information about this command and its flags, see Postman Insights Agent reference.
In Postman, select Kubernetes.
Navigate to the correct Kubernetes cluster and get the existing deployment configuration.
kubectl get deployments -A
On the Insights onboarding screen, select Add API key, and then copy and paste the command on your command line.
The command below is an example. Your API key and project ID will be autopopulated.
kubectl get -n <namespace> deployment/<deployment> -o yaml \
| POSTMAN_API_KEY=<add-your-api-key-here> postman-insights-agent kube inject --project <projectId> -s=true -f - \
| kubectl apply -f -
The following example shows the values the Insights Agent adds to the deployment.
The command creates a secret to hold your Postman key and updates the deployment with the Postman sidecar. The response looks something like this:
secret/postman-agent-secrets created
deployment.apps/cloud-api-deployment configured
Check the status of your Kubernetes container pods.
kubectl get pods -n <your_namespace>
The status response looks something like this:
NAME READY STATUS RESTARTS AGE
cloud-api-deployment-5db4fBc64-cknhc 2/2 Running 0 4h40m
cloud-api-deployment-7f97856c7f-p5Lv7 2/2 Running 0 15h
Get the logs from the sidecar.
kubectl logs -n <your_namespace> <your_pod> postman-insights-agent
Let the Insights Agent run for a minute and observe the HTTP and TLS traffic on your ports.
Return to Postman and observe an Insights Project populated for your services.
Your Insights Project can take a few minutes to populate.
You are ready to customize your insights and debug your endpoints. You can also review any traffic errors if your endpoints aren't populating.
To remove the sidecar from your Kubernetes deployment, do the following:
Access the sidecar in your Kubernetes deployment directory.
kubectl edit -n {your namespace} deployment/{your namespace}
Find the "spec:" / "containers:"
section.
Delete the Postman Insights Agent container with "image: public.ecr.aws/postman/postman-insights-agent:latest"
.
To uninstall the Insights Agent client on Debian and macOS, follow the steps listed below. For all other distributions of Linux and other operating systems, remove the postman-insights-agent
file from your executable file location. To fully uninstall, also remove the sidecar from your Kubernetes deployment.
To uninstall the Insights Agent client from Debian, run the following:
apt remove postman-insights-agent
To uninstall the Insights Agent client from macOS, run the following:
brew uninstall postman-insights-agent
Last modified: 2024/08/26
Additional resources
Blog posts