Kubernetes configuration to link containers

I am trying to see if there are any example to create a Kubernetes POD
which starts 2-3 containers and these containers are linked with each other but couldn’t find any.

Does anybody tried linking containers using Kubernetes config.

  • running a Sikuli (1.1.1) script on a docker (headless mode)
  • npm install error inside docker container
  • How to change “remote process types” for Heroku deploy with Docker
  • Openshift postfix server not starting
  • How to start apache2 automatically in a ubuntu docker container?
  • How to logging in Amazon Web Service ( AWS )?
  • Why is Jenkins on the docker host responding to HTTP requests from inside containers?
  • Docker running nginx plus jar
  • How to clear properly the logs of docker container?
  • My websites running in docker containers, how to implement virtual host?
  • How to send a curl in Docker Remote API?
  • Tensorflow image_retraining:retrain in docker is not found
  • 2 Solutions collect form web for “Kubernetes configuration to link containers”

    The containers in same pod shares the localhost, so you need not link containers, just use localhost:containerPort.

    You have to use the Kubernetes service (Proxy) https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/services.md#how-do-they-work.

    Have a look how they work togehter: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/guestbook

    To be specific, there is no concept of “linking” similarly to the way Docker does it. Every service endpoint is a fully qualified domain name and you just call it from one container to another, and every label on a container that can be picked up by a service endpoint can be used to direct network traffic. So, you don’t have to do ENV[“$FOO_BAR_BAZ”] to get the correct IP, just call it directly (curl http://foo_bar_baz).

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.