I have deployed and created services for socketcluster
, scc-broker
and scc-state
on kubernetes
locally via minikube
directly through using the docker-files (see this link for .yaml
files). And I have also created a service for ingress
within the same cluster with the .yaml
file provided in the link that I have mentioned. As far as I understand by default these services are of ClusterIP
type.
Deployment of the services is working properly on the vm (minikube). Status is set to running on the Kubernetes dashboard for
pods
deployment
But the issue I am facing is that there is no public endpoints exposed from scc-state, scc-broker, socketcluster server. So currently I am not able to understand how do I access the services externally i.e. outside the virtual machine (that is running on minikube).
The images were built from the kubernetes yml files directly, with the ingress TLS security disabled.
Am I missing out on any aspect as to how to access the socketcluster on the host machine? Should I specify the service type to any other type other than ClusterIP
as I know that using this type ensures that the service will be exposed within cluster only. But again my doubt is that if I am using ingress
, it should help access the services outside the vm. Do I need to have an ingress controller
separately such as NGINX ?
Any lead will be appreciate.
Thanks!
P.S. Following this guide to for the deployment.
Kubernetes doesn't expose anything outside the private container network unless you specifically tell it to. The common ways to do that are
Service
with type: LoadBalancer
to get a public IP attached to a cloud service. This isn't available on minikubeService
with type: NodePort
to expose a port on each node's public network. This is the recommended way to do things on minikube (https://github.com/kubernetes/minikube#networking)hostNetwork: true
to skip the container network and use the host network (e.g. sharing the same IP as the node itself). This is generally less useful than the previous two options except in very specific circumstances.The Ingress
resource isn't related to external connectivity. If you have an ingress-controller deployed, it will use the Ingress
resources you create to configure itself. For example, the nginx-ingress-controller (https://github.com/kubernetes/ingress/tree/master/controllers/nginx) will essentially create a server
block in the nginx configuration for each Ingress
. However, the ingress-controller itself would still need to be exposed to the external network using a Service
with type: LoadBalancer
or type: NodePort
.