Skip to main content

networking in kubernetes

let us start with single node kubernetes cluster

node has an IP 192.168.1.2
if this is minikube then we talking about minikube virtual machine inside your hypervisor

unlike dockers where IP address is assigned to dockers, in kubernetes IP address is assigned to Pods

so when kubernetes is initially configured we create an internal private network with the address.

10.244.0.0 and all pods are attached to it.
when we deploy pods they all get a separate ip address.

The pods can communicate to each other using this internal ip address bt accessing this ip address for any work may not be a good idea as its subject to change when pods are recreated.

Its kinda easy to understand networking on a single cluster but how does it work when there are multiple nodes

Comments

Popular posts from this blog

Gui logging in node js and python

For node.js Use  frontail for logging https://www.npmjs.com/package/frontail For Python -- use Cutelog https://pypi.org/project/cutelog/ In NodeJs for using frontail we need to use log the logs in a file for logging logs to file , we will use winston Using winston https://www.npmjs.com/package/winston Eg. of using winstonconst { createLogger, format, transports } = require('winston'); const { combine, timestamp, label, prettyPrint } = format; const logger = createLogger({   level: 'info',   format: format.json(),   transports: [     //     // - Write to all logs with level `info` and below to `combined.log`      // - Write all logs error (and below) to `error.log`.     //     new transports.File({ filename: 'error.log', level: 'error' }),     new transports.File({ filename: 'combined.log' })   ] }); logger.log({   level: 'info',   message: 'What time is...