0

I have a question. If you try to make a container with rubyonrails, you will suffer Grafana with container3000. What do you do in such a case? I thought about putting puma in rubyonrails (port 80) Recreating the Grafana image. Please let me know if you have any other options. I want to make a Grafana image. Is there any good site? Is there a quick port change in Grafana? Actually https://github.com/GoogleCloudPlatform/click-to-deploy/blob/master/k8s/prometheus/README.md#access-the-grafana-ui I want to use ... A bit confused at the port

Excuse me. I wanted to ask about port management, and asked if it would be okay to have containerport 3000 if it was separated by namespace or managed by static IP. I didn't have a good way to ask questions. I would be happy if you could tell me a little bit about the port

2
  • I think that you need to provide more information, about what you are trying to achive :) and show some yaml file of your kubernetes deployment
    – c4f4t0r
    Feb 4, 2020 at 19:34
  • Excuse me. I wanted to ask about port management, and asked if it would be okay to have containerport 3000 if it was separated by namespace or managed by static IP. I didn't have a good way to ask questions. I would be happy if you could tell me a little bit about the port.
    – GABAKU GIK
    Feb 5, 2020 at 8:39

1 Answer 1

0

As long as the containers are in different pods, they can both use the same containerPort. Only pods act as a single network namespace, which means if there is more than 1 container within a pod, all those containers share the same ports and thus can't use the same port numbers (2 webserver containers in the same pod will have port conflicts for 80 and 443).

If you need to have both Grafana and rubyOnRails containers in the same pod, then you do need to find a way to make one of them listen on a different port, though I don't see why you would NEED these two containers in the same pod.

1
  • Thank you I understand.
    – GABAKU GIK
    Feb 7, 2020 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.