8

TL;DR There are a number of use cases for port mapping, but for DevOps at scale the primary reason is generally to enable mapping well-known service ports to available ports on the host. This matters when you're running large numbers of containers that use the same port by default, and you don't want to manually assign or track alternative port numbers. A ...


5

This command will give you the pod CIDR addresses for each of the nodes in your cluster. kubectl get nodes -o jsonpath='{.items[*].spec.podCIDR}'


5

Assuming the following: YOUR_PC, has Redis client, SSH client, SSH access to SSH_SERVER SSH_SERVER, has SSH server, redis access to REDIS_SERVER REDIS_SERVER, has Redis server Set up the tunnel from YOUR_PC, port 1234, to REDIS_SERVER:REDIS_PORT, via SSH_SERVER ssh SSH_SERVER -L 1234:REDIS_SERVER:REDIS_PORT On another terminal, on YOUR_PC, run the redis ...


3

I am accessing my home network with a VPN running in a docker container in my home server. That sounds similar to what you want to do. Here's how I configured it (using this docker image - note that the documentation of the docker image should be enough) Use a “convenience” environment variable to store the path to your persistent storage location that ...


3

Docker actually provides DNS support for networking between containers. This means that if you define your database connection as: http://redis:6379 This will resolve redis to the correct network address, given that you fulfill the following: All containers are on the same network The containers have been named This can either be done manually by ...


2

We have redis connected through stunnel. That way you don't have to always establish the ssh connection, which can be a problem. Here is an article on how to setup redis through stunnel, which I won't copy into this answer. Feel free to edit. http://bencane.com/2014/02/18/sending-redis-traffic-through-an-ssl-tunnel-with-stunnel/


2

If you have a user-defined network set to bridge, you can access other containers by their container's name which is automatically as hostname for containers inside same network. So from containerA you could do ping containerB without problems. In your case it would be changing the setting to containerB_name:(container B needed port)/route


2

I found the solution ... Check your network interfaces (ifconfig -a cni0). Good config is: cni0: flags=4163 mtu 1450 inet 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0... That subnet (10.244.0.0) configured in flannel-deploy.yaml But, by default, a new server may have: cni0: flags=4163 mtu 1450 inet 192.168.0.1 netmask ...


2

Internal Docker networks mean there is no gateway configured to reach the outside internet, you can only reach other containers from that network. In your scenario, none of your networks should have this definition. Without setting the internal network flag, containers can reach out of the docker host, potentially to the internet if the host has that access....


2

When you instantiate a new container it has its own networking, isolated from the host. So you can NOT access the container directly from its port. ports: - 8080:80 this command will specify that you are fowarding your host port to the container port. In your local host in the port 8080 will call the port 80 of your container. There are some ways to ...


1

On Linux, containers live in separate network namespaces, so localhost or 127.0.0.1 on the container is not localhost on the host. I'm not sure about other OSes. You could expose a port to the host like this: docker run -p 3306:3306 mysql Then you can access it from any container at the host IP address, which for the default network is 172.17.0.1:3306. You ...


1

I am going to suggest an approach that I would not necessarily recommend, because I do not consider it a manageable, scalable solution: SSH port forwarding. SSH is a Swiss Army knife in terms of its features. Virtually any port can be securely forwarded to any other port on a remote machine, and indeed through a remote machine to a target machine beyond. ...


1

Do that: You cannot attach several networks using the --network option. You have to rely on the docker network connect command. So if you want the multiple network interfaces to be available at container startup, you have to do it in three steps: create the container, connect the extra network needed, and finally run the container. # create a container, ...


1

Your updated question completely changed my understanding :) Since the db is on a user-defined bridge in both cases, the advantages of using user-defined vs legacy/default bridges discussed in the doc section you referenced (which are applicable in both cases) aren't what differentiates the 2 cases. From that perspective they're equivalent. Original Answer:...


1

I could have mentioned this in comment first but I need 50 reputation to comment and I just joined this yesterday, So, may I know what you are trying to achieve? If I interpret correctly, you want to move your VMs to Docker and then make those docker interact with each other as well as with graphics which is running on host? So consider it this way, you ...


1

You need to Expose the server port in the Dockerfile get the IP that the container is listening on (e.g. docker inspect code-rade_cache_1 |jq .[0].NetworkSettings.Networks[].IPAddress ) -- note that you will need JQ installed on your computer to do this Set the connection in the mysqlphpadmin


1

Do you need to run it beside a VPN "OpenVPN service" ? I think using below would solve the issue for clearing any unused networks by at least 1 container. $ docker network prune


1

You've got a lot of unneeded settings in the compose file, here's a stripped down version that would work just as well: version: '3.3' services: service-1: build: './service-1' networks: - backend service-2: build: './service-2' ports: - '8825:8825' - '8835:8835' networks: - frontend - backend consul: ...


1

As per https://12factor.net/config, configuration like this should be stored as environment variables. The twelve-factor app stores config in environment variables (often shortened to env vars or env). Env vars are easy to change between deploys without changing any code; unlike config files, there is little chance of them being checked into the code repo ...


1

Could you please try the commands above between all hosts ? INSIDE HOST A: nc -zv HOST_B_IP_ADDRESS 2377,4789,7946 nc -zv HOST_C_IP_ADDRESS 2377,4789,7946 INSIDE HOST B: nc -zv HOST_A_IP_ADDRESS 2377,4789,7946 nc -zv HOST_C_IP_ADDRESS 2377,4789,7946 INSIDE HOST C: nc -zv HOST_A_IP_ADDRESS 2377,4789,7946 nc -zv HOST_B_IP_ADDRESS 2377,4789,7946 As ...


1

There is a comprehensive document about k8s' DNS. According to this document one could validate whether the DNS is working by running: busybox.yaml apiVersion: v1 kind: Pod metadata: name: busybox namespace: default spec: containers: - image: busybox command: - sleep - "3600" imagePullPolicy: IfNotPresent name: busybox ...


1

Disclaimer: I have not setup a working example of this I believe you are looking for Nested Traffic Managers If you setup a main traffic manager that uses performance to select between North America and Europe child traffic managers. As long as one of the services in East or West North America is functioning the child traffic manager will report its ...


Only top voted, non community-wiki answers of a minimum length are eligible