Good day!
I bumped into this post: https://cleverbuilder.com/articles/spring-boot-kubernetes/
And It seems I am able to run my spring-boot RESTful application as it is showing in the Minikube Dashboard. The problem is when I try to execute kubectl get pods
or kubectl get svc
I am not seeing my application. The kubernetes namespace that my application using is test
. I'm really puzzled now on how can I access my application. Please shed some light. Thanks!
Run, kubectl get pods -n test
, kubectl get svc -n test
and this should show you the desired output.
By default, Kubernetes
starts with the following three namespaces: Default
: Catch-all namespace for all objects not belonging to either of the kube-public
or kube-system
namespaces. The default
namespace is used to hold the default set of pods, services, and deployments used by the cluster. Since, your pod is in a custom
namespace test
(you created). You'll need to specify the namespace where your deployment is been created or pod is been deployed.
So, kubectl get pods
is actually kubectl get pods -n default
meaning show pods in default namespace. hence, doing kubectl get pods -n test
will show you all your pods in test
namespace.