How will the communication happen between SNMP which is inside a pod in a cluster with a network devices say Switch/Routers outside the cluster?
SNMP has to poll these network devices.
Do I need to create ‘NodePort’ Service or ingress controller or is there some other way?
The way I understand this is that your SNMP service is inside the cluster.
Ideally you do want a Service
to expose the service.
I don’t think you can rely on NodePort because it’s limited to a range of ports configured on cluster install. My assumption is that old RFCs for networking things aren’t fun to deal with when you use non-standard ports.
Ideally we want to use a LoadBalancer type of service, however that is a function of a CCM. Might not be available to you.
If you setup an IngressController you would need to use something that supports TCP (like traefik), however you still run into the LoadBalancer problem when exposing it.
My work around for this in the past is to setup a DaemonSet that routes traffic on specific ports to an internal service like this. In that example I was explicitly using it to emulate how the CCM for K3S works.
Hope this helps.
thanks for clarifying my doubts @protosam .
We dont use cloud technologies so Load-Balancer option I guess is not for us.
I feel that thinking in the line of Kubernetes egress could be a way to go.
I am referring to this article.
Its more like how internal application can access outer data which is egress.
I am not yet sure of a concrete solution for this though.