May 10, 2026

Kubernetes

A short write-up on why Notion makes a great lightweight CMS for a Next.js site.

Blog

Kubernetes External Traffic Flow

Common Flow

Internet
   
DNS endpoint (api.example.com)
   
Resolve Public IP (34.x.x.x)
   
Cloud Load Balancer
   
Kubernetes Cluster

Case 1 — Single Public Service (No Ingress)

Internet
   
DNS (api.example.com)
   
Public IP (34.x.x.x)
   
Cloud Load Balancer
   
Service(type=LoadBalancer)
   
Pods

Service Example

apiVersion: v1
kind: Service

metadata:
  name: api-service

spec:
  type: LoadBalancer

  selector:
    app: api

  ports:
    - port: 80
      targetPort: 3000

Use case:

  • single app/service
  • simple architecture
  • MVP/internal app

Case 2 — Multiple Services (Using Ingress)

Internet
   
DNS (api.example.com)
   
Public IP (34.x.x.x)
   
Cloud Load Balancer
   
Ingress Controller Service(type=LoadBalancer)
   
Ingress Controller Pods
   
Ingress Rules (host/path routing)
   
ClusterIP Services
   
Pods

Ingress routes traffic based on:

  • host
  • path

Example:

api.example.com/users  -> user-service
api.example.com/orders -> order-service

Ingress Example

apiVersion: networking.k8s.io/v1
kind: Ingress

metadata:
  name: app-ingress

spec:
  ingressClassName: nginx

  rules:
    - host: api.example.com

      http:
        paths:
          - path: /users
            pathType: Prefix

            backend:
              service:
                name: user-service
                port:
                  number: 80

          - path: /orders
            pathType: Prefix

            backend:
              service:
                name: order-service
                port:
                  number: 80