Spin Operator is a Kubernetes operator that empowers platform engineers to deploy Spin applications as custom resources to their Kubernetes clusters
108
stars
15
forks
source link
unable to hit external API from SPIN Go component running in SpinKube #216
Open
camba1 opened 1 week ago
What were you doing
Trying to run a simple SPIN Go component in Kubernetes that hits an external (third party) API .
What did you expect
Component to hit the cat facts public API (https://catfact.ninja/fact) and return a fact that would then be sent to the end user
What happened
The component seems to thrown a " Runtime error" on the following line. Not additional logs printed.
Additional Info
Steps to reproduce
Create a simple http-go sample application
change the contents of the init function in the main.go file to :
Push container to the image repository
Scaffold the K8s manifest
Deploy the container to k3d and port forward to it:
Navigate to localhost:8083 in the browser (or curl it) and the application throws a "Runtime error" message
Environment
k3d version v5.6.0 k3s version v1.27.5-k3s1 (default) spin-operator 0.1.0
What is the best way to debug this in K3d given that the WASM container does not have a distro and thus I assume one cannot log into the container?