I aim to collect data from a Kubernetes cluster for tracing purposes using the instana agent. I am open to any/all ways of collecting data (using instana) and using them via a python program.
I have used the helm procedure described here to install the instana host-agent on a minikube cluster. After successfully installing the agent, I could see the data populated on the Instana trial portal. When I try to run a curl request as follows, I get connection refused errors.
minikube$ curl -XPOST http://localhost:42699/com.instana.plugin.generic.event -H "Content-Type: application/json" -d '{"title":"Custom API Events ", "text": "Failure Redeploying Service Duration", "duration": 5000, "severity": -1}'
curl: (7) Failed to connect to localhost port 42699 after 0 ms: Connection refused
minikube$ curl -XPOST http://192.168.49.2:42699/com.instana.plugin.generic.event -H "Content-Type: application/json" -d '{"title":"Custom API Events ", "text": "Failure Redeploying Service Duration", "duration": 5000, "severity": -1}'
curl: (7) Failed to connect to 192.168.49.2 port 42699 after 0 ms: Connection refused
here I can see that instana host agent is deployed
minikube$ kubectl get all -n instana-agent -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/instana-agent-vr8k5 2/2 Running 0 19m 192.168.49.2 minikube <none> <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/instana-agent ClusterIP 10.111.43.80 <none> 42699/TCP 19m app.kubernetes.io/instance=instana-agent,app.kubernetes.io/name=instana-agent
service/instana-agent-headless ClusterIP None <none> 42699/TCP,42666/TCP 19m app.kubernetes.io/instance=instana-agent,app.kubernetes.io/name=instana-agent
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR
daemonset.apps/instana-agent 1 1 1 1 1 <none> 19m instana-agent,leader-elector icr.io/instana/agent:latest,icr.io/instana/leader-elector:0.5.16 app.kubernetes.io/instance=instana-agent,app.kubernetes.io/name=instana-agent
What am I doing wrong? Do I need instana back-end installed on the cluster to get the Kubernetes-related data? Should I not be doing curl requests?
Once the curl request is successful my end goal is to develop a python script to collect data from the Kubernetes cluster using either Host Agent REST API calls or some other better/more convenient method.