Vayne
Vayne

Reputation: 57

Kubernetes-Node monitors pods and executes related scripts

I have deployed a tool in the pod and need to enable port mapping on the node. But once the pod is rebuilt, the position of the pod may change and its IP will also change. Is there a corresponding resolution mechanism in k8s?

Upvotes: 0

Views: 25

Answers (1)

Rico
Rico

Reputation: 61699

Services.

There are 3 options depending on how you want to expose them but the key point is that with that you maintain a single access endpoint/IP address

The 4 options:

  • ClusterIP - Accessible internally within the cluster.
  • NodePort - A port on all your nodes where you can point your own LB to.
  • LoadBalancer - Ties to an infra LB like AWS ELB, GCP LB, etc.
  • ExternalName - Something outside your cluster

Upvotes: 1

Related Questions