top of page
Search

Shared EKS App-Team Baseline

  • Writer: Mark Kendall
    Mark Kendall
  • Dec 22, 2025
  • 2 min read

owned).


🧭 Shared EKS App-Team Baseline



Purpose

Define the minimum, compliant, repeatable deployment pattern for application teams deploying into a shared EKS cluster where:


  • Namespaces are platform-owned

  • Storage is platform-controlled

  • App teams only deploy namespaced resources






1ļøāƒ£ Ownership & Responsibility Model




Platform / Cloud Team (NOT App Team)



Owns:


  • EKS cluster

  • Namespaces

  • RBAC

  • StorageClasses / EBS CSI

  • Ingress / API Gateway

  • Kafka / MSK

  • MongoDB (if shared)




Application Team (This Repo)



Owns:


  • Deployments / StatefulSets

  • Services

  • ConfigMaps / Secrets

  • Kustomize overlays

  • Runtime configuration (DNS, env vars)



🚫 App teams never create namespaces





2ļøāƒ£ Required Repository Structure (Minimum)


k8s/

Ā  base/

Ā  Ā  deployment.yaml

Ā  Ā  service.yaml

Ā  Ā  statefulset.yaml Ā  # only if app-owned state

Ā  Ā  kustomization.yaml


Ā  overlays/

Ā  Ā  shared/

Ā  Ā  Ā  kustomization.yaml Ā  # ← namespace set here





3ļøāƒ£ Namespace Handling (MANDATORY RULE)




āŒ What app teams must NOT do


kind: Namespace

No namespace.yaml.

No metadata.namespace in resource files.





āœ… Correct Pattern (Kustomize Injection)


# k8s/overlays/shared/kustomization.yaml

kind: Kustomization


namespace: zsp Ā  # provided by Cloud team


resources:

Ā  - ../../base

Kustomize injects the namespace at render time.

Kubernetes will NOT create it.





4ļøāƒ£ Service DNS Convention (Critical)



All in-cluster communication must use Kubernetes DNS:

<service-name>.<namespace>.svc.cluster.local


Example (MongoDB)


mongodb-app.zsp.svc.cluster.local

🚫 Never hardcode old or assumed namespaces

🚫 Never use IPs

🚫 Never rely on default namespace





5ļøāƒ£ Application Configuration Pattern (RECOMMENDED)


const mongoService = "mongodb-app";

const mongoNamespace = process.env.K8S_NAMESPACE || "zsp";


export const MONGO_URL =

Ā  `mongodb://${mongoService}.${mongoNamespace}.svc.cluster.local:27017/TMF622v401`;

āœ” Namespace configurable

āœ” Code environment-agnostic

āœ” Safe across dev / test / prod





6ļøāƒ£ Storage Rules (Stateful Workloads)



If your app uses:


  • MongoDB

  • PostgreSQL

  • Kafka

  • Any PVC



Then:


  • āœ” StatefulSet + PVC is allowed only if platform enables storage

  • āŒ Do not assume EBS / StorageClass exists

  • āŒ Do not create StorageClasses

  • āŒ Do not create PVs manually unless approved



If pods are Pending due to PVC:

āž” This is a Platform issue, not an App issue





7ļøāƒ£ Pre-Deploy Checklist (App Team)



Before applying manifests:

kubectl get ns <namespace>

kubectl auth can-i create pods -n <namespace>

kubectl auth can-i create services -n <namespace>

kubectl auth can-i create pvc -n <namespace>

If any fail → stop and escalate





8ļøāƒ£ Safe Deploy Commands




Render first (always)


kubectl kustomize k8s/overlays/shared

Verify:


  • All resources show namespace: zsp

  • No Namespace object exists




Apply


kubectl apply -k k8s/overlays/shared





9ļøāƒ£ Common Failure → Correct Owner


Symptom

Owner

Pods Pending (PVC)

Platform

Namespace not found

Platform

RBAC forbidden

Platform

DNS not resolving

App (wrong namespace)

Service not found

App

CrashLoopBackOff

App





šŸ”Ÿ One Rule to Remember



Platform creates namespaces.

App teams deploy into them.

Kustomize injects them.

DNS must match them.





šŸ“Œ Optional: Add This to Every Repo README


This service is deployed into a shared EKS cluster.

Namespaces, storage, and ingress are platform-owned.

This repo uses Kustomize namespace injection and must not

create Kubernetes Namespace resources.





āœ… Result



  • Zero namespace conflicts

  • No RBAC fights

  • Predictable DNS

  • Easy audits

  • Repeatable across all TMF services




Ā 
Ā 
Ā 

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Post: Blog2_Post

Subscribe Form

Thanks for submitting!

©2020 by LearnTeachMaster DevOps. Proudly created with Wix.com

bottom of page