Terraform: Port mapping for containers that run worker processes

If I understood the docs correct, it appears a EKS may restart containers if unable to connect to it via an open port?
What if my container is running a worker job? Do I still need to define the port settings in terraform?
Do I need to do something like example below? Or can I just remove the Ports configuration attribute?


 min_running_instances = 1
  max_running_instances = 1
  ports                 = [
    {
      internal_port       = 80
      external_port       = 80
      protocol            = "HTTP"
      publicly_accessible = false
    }
  ]

When a port is declared, Kubernetes regularly checks about this port to ensure your application is running. If it’s not the case, the pod will be restarted because, for Kubernetes, something is going wrong.

If you don’t have any port to declare, then fine, don’t declare one. Otherwise, Kubernetes will try over and over again to ensure this port is open, ending up in an infinite restart loop.