I have a deployment on Minikube for a .Net Core 5 API that is not returning response when I try to invoke it from Postman. When I run a GET from Postman to the exposed port (32580) and endpoint http:// localhost:32580/api/platforms/ I get:
Error: getaddrinfo ENOTFOUND
Oddly enough I was previously getting a Connection refused (before I restarted my Docker desktop). The container works perfectly when I use Docker but once I deployed it to Kubernetes context it no longer works.
I am unsure how exactly I can debug the container and get more meaningful error detail.
I have tried the following:
- Checking status of Deployment (platforms-depl)
NAME READY UP-TO-DATE AVAILABLE AGE
hello-minikube 1/1 1 1 134d
ping-google 0/1 1 0 2d2h
platforms-depl 1/1 1 1 115m
- Checking status of Pod (platforms-depl-84d7f5bdc6-sgxcp)
NAME READY STATUS RESTARTS AGE
hello-minikube-6ddfcc9757-6mfmf 1/1 Running 21 134d
ping-google-5f84d66fcc-kbb7j 0/1 ImagePullBackOff 151 2d2h
platforms-depl-84d7f5bdc6-sgxcp 1/1 Running 1 115m
- Running
kubectl describe pod platforms-depl-84d7f5bdc6-sgxcpgives below output (truncated):
Status: Running
IP: 172.17.0.3
IPs:
IP: 172.17.0.3
Controlled By: ReplicaSet/platforms-depl-84d7f5bdc6
Containers:
platformservice:
Container ID: docker://a73ce2dc737206e502df94066247299a6dcb6a038087d0f42ffc6e3b9dd194dd
Image: golide/platformservice:latest
Image ID: docker-pullable://golide/platformservice@sha256:bbed5f1d7238d2c466a6782333f8512d2e464f94aa64d8670214646a81b616c7
Port: <none>
Host Port: <none>
State: Running
Started: Tue, 28 Sep 2021 15:12:22 +0200
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-rl5kf (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
-
When I run
docker psI cannot see the container and it also doesn't appear in the list of running containers in VS Code Docker/Containers extension. -
kubectl get servicesgives me the following:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-minikube NodePort 10.99.23.44 <none> 8080:31378/TCP 134d
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 134d
paymentsapi NodePort 10.111.243.3 <none> 5000:30385/TCP 108d
platformnpservice-srv NodePort 10.98.131.95 <none> 80:32580/TCP 2d2h
Then tried pinging the ClusterIP:
Pinging 10.98.131.95 with 32 bytes of data:
Request timed out.
Request timed out.
Ping statistics for 10.98.131.95:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
What am I missing?
I read in suggestions I have to exec into the pod so that I get meaningful output but I'm not sure of the exact commands to run. I tried:
kubectl exec POD -p platforms-depl-84d7f5bdc6-sgxcp
only to get error:
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Error from server (NotFound): pods "POD" not found
My environment Docker Linux containers with WSL2 on Windows 10.
What am I missing?
所有评论(0)