Taints are a mechanism that allow a node to repel certain pods from being scheduled on it. They work together with tolerations (defined on pods) to control which pods can run on which nodes.
The core idea
A taint marks a node as “special” or “restricted.” Only pods that explicitly tolerate that taint will be scheduled there. Everything else is kept away.
Taint structure
A taint has three parts:
key=value:effect
key — a label-like identifier (e.g. dedicated, gpu)
value — optional qualifier (e.g. true, high-memory)
effect — what happens to pods that don’t tolerate it
The three effects
Effect
Behavior
NoSchedule
New pods won’t be scheduled on the node. Existing pods stay.
PreferNoSchedule
Kubernetes tries to avoid scheduling pods here, but will if necessary.
NoExecute
New pods won’t be scheduled AND existing non-tolerating pods are evicted.
A pod opts in to a tainted node by declaring a toleration in its spec:
spec:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "gpu"
effect: "NoSchedule"
A toleration with operator: Exists matches any value for that key:
tolerations:
- key: "dedicated"
operator: "Exists"
effect: "NoSchedule"
Common real-world use cases
Dedicated nodes — Reserve a node exclusively for a team or workload (e.g. GPU nodes for ML jobs). Taint the node; only ML pods carry the toleration.
Node issues — Kubernetes itself auto-taints nodes when they’re unhealthy (e.g. node.kubernetes.io/not-ready:NoExecute), causing pods to be evicted.
Control plane isolation — Master/control-plane nodes are tainted by default (node-role.kubernetes.io/control-plane:NoSchedule) so regular workloads don’t land there.
Spot/preemptible nodes — Taint spot instances so only fault-tolerant workloads with the matching toleration run there.
Google Kubernetes Engine is Google Cloud’s managed Kubernetes service — Google manages the control plane, you manage the worker nodes (or let Autopilot manage everything).
GKE best practices come down to three pillars — security by default (private cluster, Workload Identity, least privilege), reliability by design (regional cluster, anti-affinity, autoscaling, probes), and cost efficiency (spot VMs, committed use, right-sizing with VPA). Get these right from day one and you avoid the most painful production incidents.
oc login https://api.cluster.com # authenticate to cluster
oc whoami # current user
oc projects # list projects
oc status # project overview
oc debug node/worker-1 # debug a node
oc rsh pod/api-pod # remote shell into pod
oc cp file.txt api-pod:/tmp/ # copy files to pod
oc port-forward pod/api 8080:8080 # port forward
Q5. What is a DeploymentConfig vs a Deployment in OpenShift?
A: DeploymentConfig (DC) is OpenShift’s original deployment resource — predates Kubernetes Deployment. OCP 4.x supports both but Deployment is now recommended.
A: An ImageStream is an OpenShift abstraction that tracks container images and their tags — like a pointer to images that can trigger deployments automatically.
External Registry ImageStream Deployment
───────────────── ────────────── ──────────
quay.io/myapp:1.0 ───▶ myapp:1.0 ─────────▶ Pod runs
OpenShift takes a different approach to ingress than vanilla Kubernetes. It has its own native routing layer that predates Kubernetes Ingress and is more powerful out of the box.
# Only allow developers to create Routes in their namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: route-creator
namespace: team-a
rules:
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- get
- list
- create
- update
- patch
---
# Restrict to specific hostnames via admission webhook
# or use OCP's built-in route admission policy
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
name: default
spec:
routeAdmission:
namespaceOwnership: Strict # ← namespace must own the hostname
wildcardPolicy: WildcardsDisallowed
Quick Reference — OCP CLI Commands
# Create a route quickly
oc expose service api-service \
--hostname=api.apps.cluster.acme.com \
--port=8080
# Create TLS edge route
oc create route edge api-tls \
--service=api-service \
--hostname=api.apps.cluster.acme.com \
--cert=api.crt \
--key=api.key
# Create passthrough route
oc create route passthrough api-pass \
--service=api-service \
--hostname=api.apps.cluster.acme.com
# View all routes
oc get routes -A
# Describe route
oc describe route api-route -n production
# Check router pods
oc get pods -n openshift-ingress
# View router logs
oc logs -n openshift-ingress \
deployment/router-default -f
# Check IngressController status
oc get ingresscontroller -n openshift-ingress-operator
oc describe ingresscontroller default \
-n openshift-ingress-operator
# Scale router
oc patch ingresscontroller default \
-n openshift-ingress-operator \
--type=merge \
-p '{"spec":{"replicas":3}}'
Route vs Ingress vs Gateway API in OCP
OCP Route
K8s Ingress
Gateway API
Native to OCP
✅
⚠️ Converted to Route
❌ Needs controller
TLS modes
Edge/Passthrough/Reencrypt
Edge only
All modes
Traffic splitting
✅ Native weights
❌ Annotations
✅ Native
HAProxy tuning
✅ Annotations
⚠️ Limited
⚠️ Controller-specific
Role separation
❌
❌
✅
TCP/gRPC
❌
❌
✅
Portability
OCP only
✅
✅
Recommended for
OCP-native workloads
Migration from K8s
New multi-team setups
Decision Guide for OCP
New OCP cluster, single team?
└──▶ Use OCP Routes — simplest, most native
Migrating from vanilla Kubernetes?
└──▶ Use Kubernetes Ingress — auto-converted to Routes
migrate to Routes over time
Multi-team cluster, need role separation?
└──▶ Use Gateway API with supported controller
Need passthrough TLS (app owns cert)?
└──▶ Use OCP Route with termination: passthrough
Need internal-only routing?
└──▶ Create separate IngressController with Internal LB
label Routes with router: internal
Need canary / blue-green?
└──▶ Use OCP Route alternateBackends (native)
or Argo Rollouts + Route integration
OCP Routes are the most integrated and operationally simple option for OpenShift — they work out of the box with HAProxy, support all TLS modes, and have native traffic splitting. Use Kubernetes Ingress for portability and Gateway API when you need multi-team role separation or advanced L7 features.
Q1. What is Kubernetes Ingress and why do we need it?
Ingress is a Kubernetes API object that manages external HTTP/HTTPS access to services inside a cluster. It provides a single entry point that can route traffic to multiple services based on host, path, or headers — without needing a separate LoadBalancer service per application.
Without Ingress:
Service A → LoadBalancer → public IP 20.x.x.1 ($$$)
Service B → LoadBalancer → public IP 20.x.x.2 ($$$)
Service C → LoadBalancer → public IP 20.x.x.3 ($$$)
With Ingress:
Single LoadBalancer → public IP 20.x.x.1
/api → Service A
/app → Service B
/admin → Service C
One IP, one LB, one TLS certificate
Q2. What is the difference between Ingress and a Service of type LoadBalancer?
LoadBalancer Service
Ingress
Layer
L4 (TCP/UDP)
L7 (HTTP/HTTPS)
Routing
IP + port only
host, path, headers
TLS termination
❌
✅
Cost
One LB per service
One LB for all services
Path-based routing
❌
✅
Host-based routing
❌
✅
Q3. What are the components of an Ingress resource?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
namespace: production
annotations: # controller-specific config
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx # which controller handles this
tls: # TLS configuration
- hosts:
- app.contoso.com
secretName: tls-secret
rules: # routing rules
- host: app.contoso.com # host-based routing
http:
paths:
- path: /api # path-based routing
pathType: Prefix
backend:
service:
name: api-service
port:
number: 8080
- path: / # default backend
pathType: Prefix
backend:
service:
name: frontend-service
port:
number: 80
Q4. What is an Ingress Controller? Is it included in Kubernetes by default?
An Ingress Controller is the implementation — it reads Ingress resources and configures an actual reverse proxy or load balancer accordingly. Kubernetes defines the Ingress API but ships with no controller by default — you must install one.
Popular controllers:
Controller
Best for
NGINX Ingress Controller
General purpose — most widely used
Traefik
Dynamic config, microservices
HAProxy
High performance, enterprise
AWS ALB Ingress Controller
EKS on AWS
Azure Application Gateway Ingress (AGIC)
AKS on Azure
GCE Ingress Controller
GKE on GCP
Istio Gateway
Service mesh environments
Q5. What are the three pathType values and how do they differ?
# Exact — must match exactly
- path: /api/v1
pathType: Exact
# Matches: /api/v1
# Does NOT match: /api/v1/, /api/v1/users
# Prefix — matches path prefix split by /
- path: /api
pathType: Prefix
# Matches: /api, /api/, /api/v1, /api/v1/users
# Does NOT match: /apiv1, /apiusers
# ImplementationSpecific — controller decides
- path: /api/*
pathType: ImplementationSpecific
# Behaviour depends on your ingress controller
# NGINX: regex support
# Traefik: glob support
Q6. What is the difference between host-based and path-based routing?
# Host-based routing — different subdomains → different services
rules:
- host: api.contoso.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-service
port:
number: 80
- host: app.contoso.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend-service
port:
number: 80
# Path-based routing — same host, different paths → different services
rules:
- host: contoso.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-service
port:
number: 80
- path: /static
pathType: Prefix
backend:
service:
name: cdn-service
port:
number: 80
- path: /
pathType: Prefix
backend:
service:
name: frontend-service
port:
number: 80
Q7. What is a default backend?
The default backend handles requests that match no rule in any Ingress. It returns a 404 or custom error page:
spec:
defaultBackend:
service:
name: default-404-service
port:
number: 80
rules:
- host: app.contoso.com
...
# Any request not matching app.contoso.com → default-404-service
Section 2 — Ingress Controllers
Q8. How does NGINX Ingress Controller work internally?
1. You apply an Ingress resource to the cluster
2. NGINX Ingress Controller watches Ingress objects via
Kubernetes API server watch stream
3. Controller translates Ingress rules into nginx.conf:
Q11. What is the difference between NGINX Ingress Controller and AGIC (Azure Application Gateway Ingress Controller)?
NGINX Ingress
AGIC
Runs as
Pod inside cluster
Azure resource outside cluster
Load balancer
Service type LB in front
Azure Application Gateway
WAF
Manual config
Azure WAF built-in
TLS
cert-manager or manual
Azure-managed certs
Health probes
Internal
Azure LB health probes
Autoscaling
HPA on NGINX pods
App Gateway autoscales natively
Best for
Any cluster
AKS on Azure
ARO support
✅
Limited
Section 3 — TLS and Security
Q12. How do you configure TLS termination in Ingress?
# Step 1: Create TLS secret
kubectl create secret tls tls-contoso \
--cert=tls.crt \
--key=tls.key \
-n production
# Step 2: Reference in Ingress
spec:
tls:
- hosts:
- app.contoso.com
- api.contoso.com
secretName: tls-contoso # must be in same namespace as Ingress
rules:
- host: app.contoso.com
...
TLS is terminated at the Ingress controller — traffic between the controller and backend pods travels unencrypted inside the cluster by default (unless you enable backend SSL).
Q13. How does cert-manager automate TLS certificate issuance?
# Install cert-manager, then create a ClusterIssuer
secretName: tls-app-contoso # cert-manager creates this Secret automatically
cert-manager watches the Ingress → sees the annotation → calls Let’s Encrypt ACME API → completes HTTP-01 challenge → stores cert in the named Secret → auto-renews before expiry.
Q14. How do you enforce HTTPS redirect in Ingress?
Ingress was designed in the early days of Kubernetes and was never meant to handle the complexity of modern traffic management. Over time its limitations became painful.
Ingress limitations:
├── No native traffic splitting (canary needs annotations)
├── No TCP/UDP routing
├── Annotations are controller-specific (NGINX ≠ Traefik ≠ AGIC)
├── No role separation (devs and ops share same resource)
Step 3: Create Gateway (replaces controller Service config)
Moves TLS config here
Step 4: Convert Ingress rules → HTTPRoutes
One HTTPRoute per service/team
Step 5: Test HTTPRoutes alongside existing Ingress
Both can run simultaneously
Step 6: Remove Ingress resources when validated
# Helpful tool — ingress2gateway converter
go install sigs.k8s.io/ingress2gateway@latest
ingress2gateway print \
--input-file ingress.yaml \
--providers nginx
# Outputs equivalent Gateway API resources
When to Use Each
Use Ingress if:
✅ Simple HTTP/HTTPS routing
✅ Single team manages everything
✅ Already heavily invested in Ingress annotations
✅ Your controller doesn't support Gateway API yet
✅ K8s version < 1.24
Use Gateway API if:
✅ Multiple teams share the cluster
✅ Need TCP / UDP / gRPC routing
✅ Need native traffic splitting (canary)
✅ Want controller-portable config
✅ Building new clusters from scratch
✅ K8s 1.24+ (stable support)
✅ Need fine-grained TLS control
✅ Enterprise / production-grade setup
Summary
INGRESS GATEWAY API
─────────────────────── ───────────────────────
One resource does everything Three-tier role model
Annotations for everything Native filters + rules
Controller-specific behaviour Portable across controllers
HTTP only HTTP, TCP, UDP, gRPC
No role separation GatewayClass → Gateway → Route
Stable, widely supported Stable from K8s 1.28
Good for simple setups Built for enterprise scale
Gateway API is the future of Kubernetes traffic management — Ingress is in maintenance mode. For new clusters and teams, Gateway API is the clear choice. For existing Ingress setups, migration is straightforward and the ingress2gateway tool makes it even easier.
Ingress is a Kubernetes API object that manages external HTTP/HTTPS access to services inside a cluster. It acts as a smart entry point — routing traffic based on hostnames, paths, and rules.
WITHOUT Ingress: WITH Ingress:
Internet Internet
│ │
├──▶ LoadBalancer (Service A) │
├──▶ LoadBalancer (Service B) ┌───▼────────────────┐
kubectl describe certificate acme-tls-secret -n production
# Common issues checklist
# ❌ 404 — path not matching, check pathType
# ❌ 502 — backend pod not running or wrong port
# ❌ 503 — no healthy endpoints
# ❌ SSL error — cert not ready, check cert-manager
# ❌ No address — ingress controller not installed
Summary
User Request
│
▼
DNS (api.acme.com → Ingress LB IP)
│
▼
Ingress Controller (NGINX / Traefik / AGIC)
│ reads Ingress resources
│ terminates TLS
│ matches host + path rules
│
├──▶ /api → api-service → pods
├──▶ /auth → auth-service → pods
└──▶ / → frontend → pods
Ingress is the front door of your Kubernetes cluster — one external IP, intelligent routing, TLS termination, and full control over how traffic reaches your services.
A sidecar is an additional container running inside the same pod as your main application container — sharing the same network, storage, and lifecycle.
┌─────────────────────────────────────────┐
│ POD │
│ │
│ ┌─────────────────┐ ┌───────────────┐ │
│ │ Main App │ │ Sidecar │ │
│ │ Container │ │ Container │ │
│ │ │ │ │ │
│ │ (your code) │ │ (helper code) │ │
│ └─────────────────┘ └───────────────┘ │
│ │
│ Shared: Network (localhost) │ Volumes │
└─────────────────────────────────────────┘
The name comes from a motorcycle sidecar — it’s attached to the main vehicle, travels with it, but serves a separate purpose.
Why Use a Sidecar?
The core idea is separation of concerns — your app does business logic, the sidecar handles cross-cutting concerns.
# Main + sidecar — run together after init completes
containers:
- name: api
image: myapp:latest
- name: log-shipper
image: fluentd:latest
Native Sidecar Support (Kubernetes 1.29+)
Before K8s 1.29, sidecars were just regular containers with ordering hacks. Now there is first-class sidecar support via initContainers with restartPolicy: Always.
spec:
initContainers:
# New native sidecar — starts before main app
# but keeps running alongside it
- name: log-shipper
image: fluentd:latest
restartPolicy: Always # ← this makes it a native sidecar
volumeMounts:
- name: log-volume
mountPath: /var/log/app
containers:
- name: api
image: myapp:latest
Benefits of native sidecars:
Issue (old way)
Fix (native sidecar)
Sidecar starts same time as app — race condition
Sidecar starts before main app
Job pods never complete (sidecar keeps running)
Sidecar exits when main container exits
No guaranteed startup order
Guaranteed: init sidecars → main containers
Probe failures affect main container
Sidecar lifecycle is independent
Resource Management for Sidecars
Always set resource limits — sidecars can starve your main app.
The sidecar pattern is one of the most powerful patterns in Kubernetes — it’s what makes service meshes, log aggregation pipelines, and secret management work transparently across every service in your cluster without touching application code.
A: A service mesh is a dedicated infrastructure layer that manages service-to-service communication in a microservices architecture. Without it, every service must implement its own retry logic, timeouts, mTLS, and observability — leading to duplicated code across every language/framework.
A service mesh moves all of that into a sidecar proxy (or kernel via eBPF) so the application stays focused on business logic.
Problems it solves:
No encryption between services by default
Hard to debug distributed failures
Retry/timeout logic duplicated in every service
No visibility into which service is causing latency
No way to do canary releases at the network level
Q2. What is the difference between a sidecar proxy and a service mesh control plane?
A:
Control Plane (istiod / Linkerd Controller)
- Manages configuration
- Issues and rotates mTLS certificates
- Pushes routing rules to all proxies
- Collects telemetry
Data Plane (Envoy / linkerd-proxy sidecars)
- Actually intercepts and forwards traffic
- Enforces routing rules
- Enforces mTLS
- Emits metrics and traces
The control plane tells proxies what to do. The data plane does it.
Q3. What is mTLS and how does a service mesh implement it?
A: mTLS (mutual TLS) means both sides of a connection authenticate each other — unlike regular TLS where only the server presents a certificate.
How a mesh implements it:
Control plane acts as a Certificate Authority (CA)
Issues a unique certificate to every pod (bound to its service account)
Sidecar intercepts all outbound/inbound traffic
Automatically performs TLS handshake — app sees plain HTTP
Certificates are rotated automatically (e.g. every 24 hours)
Pod A (app) → sidecar (presents cert A)
──────── mTLS ────────────▶
sidecar (presents cert B) → Pod B (app)
Application code is completely unaware of TLS.
Q4. What is the difference between PeerAuthentication and AuthorizationPolicy in Istio?
A:
PeerAuthentication
AuthorizationPolicy
What
How traffic is authenticated
What traffic is allowed
Controls
mTLS mode (STRICT / PERMISSIVE / DISABLE)
Allow/deny rules between services
Think of it as
“Must use mTLS”
“Only frontend can call backend”
# PeerAuthentication — enforce mTLS
spec:
mtls:
mode: STRICT
# AuthorizationPolicy — control who can call what
spec:
action: ALLOW
rules:
- from:
- source:
principals: ["cluster.local/ns/prod/sa/frontend"]
Q5. What is the difference between a VirtualService and a DestinationRule in Istio?
The istio-init container sets iptables rules to intercept all traffic through the Envoy proxy on ports 15001 (outbound) and 15006 (inbound) — without changing the app.
Intermediate Level
Q8. How does Istio handle certificate rotation and what happens if istiod goes down?
A:
Istio’s CA (inside istiod) issues SVID certificates (SPIFFE format) to each workload
Default cert lifetime: 24 hours, rotated at ~75% of lifetime (around 18 hours)
Rotation happens via SDS (Secret Discovery Service) — Envoy requests new certs automatically
If istiod goes down:
Existing connections continue (Envoy already has certs)
New pods cannot get certificates — they’ll fail to start mesh enrollment
Routing rule updates stop propagating
Existing routing rules remain cached in Envoy
This is why istiod HA (multiple replicas) is critical in production:
Q9. Explain circuit breaking in Istio. How is it configured?
A: Circuit breaking stops sending traffic to an unhealthy service to prevent cascading failures — similar to an electrical circuit breaker.
Three mechanisms in Istio:
1. Connection Pool Limits — limits concurrent connections
connectionPool:
tcp:
maxConnections: 100
http:
http1MaxPendingRequests: 50
http2MaxRequests: 200
2. Outlier Detection — ejects unhealthy pods from load balancer
outlierDetection:
consecutive5xxErrors: 5 # 5 errors in a row
interval: 10s # check every 10s
baseEjectionTime: 30s # eject for 30s minimum
maxEjectionPercent: 50 # never eject more than 50% of pods
3. Pending Request Limits — rejects requests when queue is full
When circuit opens → caller gets 503 UF (Upstream overflow) immediately instead of waiting for timeout — fails fast.
Q10. What is the difference between Istio’s ingress gateway and a standard Kubernetes Ingress?
A:
K8s Ingress
Istio Gateway + VirtualService
L7 routing
Basic (host/path)
Advanced (headers, weights, regex)
mTLS termination
Controller-dependent
Native
Traffic splitting
Not supported
Full canary/weighted support
Fault injection
❌
✅
Retries/timeouts
❌
✅
Observability
Limited
Full Envoy metrics + traces
# Istio Gateway — defines the listener
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: api-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: api-tls-cert
hosts:
- api.acme.com
---
# VirtualService — defines routing behind the gateway
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: api-vs
spec:
hosts:
- api.acme.com
gateways:
- api-gateway
http:
- route:
- destination:
host: api-service
subset: v1
Q11. How do you implement a canary deployment with Istio?
A:
Step 1: Deploy v2 alongside v1 (both running)
Step 2: Create DestinationRule with subsets
Step 3: Use VirtualService to split traffic
Step 4: Gradually shift weight
Step 5: Monitor error rates and latency
Step 6: Cut over to 100% v2 or rollback
# DestinationRule — define v1 and v2 subsets
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: api-dr
spec:
host: api-service
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
---
# VirtualService — start at 5% canary
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: api-canary
spec:
hosts:
- api-service
http:
- route:
- destination:
host: api-service
subset: v1
weight: 95
- destination:
host: api-service
subset: v2
weight: 5 # ← increase this gradually
Progressive delivery tools like Flagger or Argo Rollouts automate this — they watch error rates and auto-promote or rollback.
Q12. What is Envoy’s xDS API and why does it matter?
A: xDS is the configuration API that istiod uses to push config to all Envoy proxies dynamically — without restarting them.
API
Controls
LDS (Listener Discovery Service)
Ports to listen on
RDS (Route Discovery Service)
Routing rules
CDS (Cluster Discovery Service)
Upstream service endpoints
EDS (Endpoint Discovery Service)
Individual pod IPs per cluster
SDS (Secret Discovery Service)
TLS certificates
istiod
├── LDS → "listen on port 15001"
├── RDS → "route /api/* to cluster api-service-v1"
├── CDS → "cluster api-service-v1 exists"
├── EDS → "api-service-v1 has pods 10.0.1.5, 10.0.1.6"
└── SDS → "here's your mTLS cert, rotate in 18h"
Why it matters: config changes propagate to thousands of pods in seconds with zero restarts.
Q13. How does Linkerd differ from Istio architecturally?
A:
Istio
Linkerd
Proxy
Envoy (C++, general purpose)
linkerd2-proxy (Rust, purpose-built)
Control plane
istiod (monolith of Pilot+Citadel+Galley)
destination + identity + proxy-injector
Config model
CRDs (VirtualService, DestinationRule, etc.)
SMI / HTTPRoute (simpler)
Resource usage
~50-100MB RAM per sidecar
~10-20MB RAM per sidecar
Feature set
Exhaustive
Focused (does less, does it well)
Operational complexity
High
Low
Protocol detection
Manual hints sometimes needed
Automatic
Key insight: Linkerd’s proxy is written in Rust specifically for this use case — it’s faster and lighter than Envoy. Istio uses Envoy which is a general-purpose proxy with far more knobs.
Q14. What is SPIFFE and how does Istio use it?
A:SPIFFE (Secure Production Identity Framework For Everyone) is a standard for workload identity in cloud-native environments.
Cilium (no sidecar): ~0MB per pod (shared ztunnel on node)
Mitigation strategies:
Strategy
Impact
Use Linkerd instead of Istio for latency-sensitive services
3-5x lower latency overhead
Istio Ambient Mesh (ztunnel)
Eliminates per-pod sidecar cost
Tune Envoy concurrency (--concurrency 2)
Reduce CPU usage
Use PERMISSIVE only where needed
Avoid double encryption
Disable unused features (tracing sampling %)
Lower telemetry overhead
Set sidecar resource limits
Prevent noisy neighbor issues
Exclude non-mesh workloads (batch jobs)
No sidecar for jobs that don’t need it
# Reduce tracing overhead — sample 1% in prod
apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
name: mesh-tracing
namespace: istio-system
spec:
tracing:
- providers:
- name: jaeger
randomSamplingPercentage: 1.0 # ← not 100%
Quick-Fire Questions
Q: What port does Envoy listen on for inbound/outbound? Inbound: 15006, Outbound: 15001, Admin: 15000, Health: 15021
Q: What is the difference between east-west and north-south traffic? North-south = traffic entering/leaving the cluster (ingress/egress). East-west = service-to-service inside the cluster.
Q: Can you use a service mesh without Kubernetes? Yes — Consul Connect supports VMs. Istio has VM mesh support. But Kubernetes is the primary target.
Q: What is SMI (Service Mesh Interface)? A standard set of Kubernetes CRDs that provide a common API across mesh implementations (TrafficSplit, TrafficPolicy, etc.) so tools like Flagger work with any mesh.
Q: What happens to traffic if the sidecar crashes? Traffic is intercepted by iptables rules pointing to the sidecar. If the sidecar is down, traffic is dropped — not bypassed. This is by design for security.
Q: How do you exclude a namespace from the mesh? Remove the istio-injection=enabled label and restart pods. Or annotate pods with sidecar.istio.io/inject: "false".
A service mesh is a dedicated infrastructure layer that handles all service-to-service communication inside a Kubernetes cluster — without changing application code.
kubectl logs api-pod-xxx -n production -c istio-proxy
# Debug traffic issues
istioctl analyze -n production # ← catch misconfigs
# Linkerd debugging
linkerd viz stat deployments -n production
linkerd viz routes deployment/api -n production
linkerd viz edges deployment -n production
A service mesh is the foundation of zero-trust networking inside Kubernetes — mTLS by default, explicit authorization policies, and full observability without touching application code. Start with Linkerd for simplicity or Istio if you need the full feature set.