Kubernetes Classroom Series – 21/Jun/2021

Pod-to-Service Networking

  • Lets consider the following manifests.
  • Deployment Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
  # Unique key of the Deployment instance
  name: deployment-example
spec:
  # 3 Pods should exist at all times.
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        # Apply this label to pods and default
        # the Deployment label selector to this value
        app: nginx
    spec:
      containers:
      - name: nginx
        # Run this image
        image: nginx:1.14
  • Service Manifest
apiVersion: v1
kind: Service
metadata:
  name: nginx-svc
spec:
  selector:
    app: nginx
  ports:
    - port: 80
      targetPort: http
  • The above manifests will lead to pod and service creation as shown below
  • Each node will have a kube-proxy which is a key component. It’s role is to load-balance the traffic that is desired for services (via cluster ip and node ports) to the correct backend pods.
  • kube-proxy can run in one of three modes
    • user space
    • iptables
    • IPVS
  • Refer Here before the next class

Topics To Revise

  • DNS
  • Kubernetes Controllers
  • Container registries
  • Micro Services

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company
Exit mobile version
%%footer%%