Skip to content

Eslam SifeEldin

Principal Software Engineer

Giza, Egypt · works remotely

Status: open for consulting, contract, projects

Revision 2026-11 · 11+ years in production

me@eslamsife.com

§5All writing

Kubernetes Deployment Strategies for Java Applications

A practical guide to deploying Java applications on Kubernetes, covering rolling updates, blue-green deployments, and canary releases.

Author
Eslam SifeEldin, Principal Software Engineer
Published
Reading time
7 min
Topic
DevOps

Deploying Java applications to Kubernetes requires understanding various deployment strategies.

Rolling Updates

The default strategy that gradually replaces old pods:

YAML
apiVersion: apps/v1
kind: Deployment
metadata:
  name: order-service
spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0

Blue-Green Deployments

Maintain two identical environments:

YAML
# Switch traffic by updating service selector
apiVersion: v1
kind: Service
metadata:
  name: order-service
spec:
  selector:
    app: order-service
    version: green  # Switch to blue for rollback

Canary Releases

Gradually shift traffic to new version using Istio:

YAML
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
spec:
  http:
  - route:
    - destination:
        host: order-service
        subset: v1
      weight: 90
    - destination:
        host: order-service
        subset: v2
      weight: 10

Choose the strategy that best fits your risk tolerance and deployment frequency.

Filed under: Kubernetes, Docker, DevOps, Deployment

Share:

Working on a system like this?

I take on architecture consulting, contract engineering and full projects. Tell me what the system does today and what it needs to do next.

Email me about this

I usually reply within a day

All writing