Create Kubernetes Manifests¶
| Category | System Design & Kubernetes |
| Status | ✅ Completed |
| Repo | nextwork-create-kubernetes-manifests |
| Original NextWork guide | nextwork.ai |
Learning project
Practice work following a NextWork guide, separate from my production projects.
📚 NextWork learning project. This is a practice project I built while working through NextWork's Create Kubernetes Manifests guide. It is part of my Learning portfolio and is fully separate from my production projects.
Category: Learning › System Design & Kubernetes
Status: ✅ Completed
Overview¶
Project 3 of the series covers manifest files, the declarative contract that tells Kubernetes what to run (the Deployment) and how to reach it (the Service). Both manifests are commented line by line for the secret mission. I added production-minded extras: probes and resource requests and limits.
Summary¶
I validated the annotated Deployment and Service manifests against a real Amazon EKS API server (kubectl apply --dry-run=server), with the image pointing at the real ECR repository, then applied them in the follow-up project. The cluster and ECR repository were deleted right after.
The checks behind this are in docs/verification.txt.
Skills & tools¶
Kubernetes manifests, Deployments, Services (NodePort), Labels & selectors, Probes, Resource limits, kubeconform, YAML
What I built¶
flask-deployment.yaml: 3 replicas, label selector, container port 8080, readiness and liveness probes, resources, and annotations explaining each field.flask-service.yaml: NodePort Service that selects the backend pods.validate.sh: kubeconform schema validation in strict mode, pluskubectl apply --dry-run=serveragainst the local kind cluster.
How to run¶
./validate.sh
# On EKS: replace IMAGE_PLACEHOLDER with your ECR image URI, then
kubectl apply -f flask-deployment.yaml -f flask-service.yaml
Verification¶
I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.
./ensure-cluster.sh && ./validate.sh
Real AWS deployment (2026-12-02)¶
I ran one short-lived Amazon EKS session (us-east-1) for the whole four-part Kubernetes x AWS series. I created the cluster once with eksctl, used it for all four parts, and deleted it right after. The ledger records it as a single entry. To keep costs down I didn't pin a version (eksctl picked Kubernetes 1.37, which is in standard support; versions in extended support cost 6x more for the control plane), disabled the NAT Gateway (nodes sit in public subnets), and used 3x t3.small nodes. I ran eksctl, kubectl, docker and the AWS CLI from my own Linux box, where the guide uses an EC2 instance as the control machine.
Evidence (excerpt; the full, sanitized transcript is in docs/aws-real-run.txt, with the account ID redacted):
=== REAL AWS RUN: one short-lived EKS session shared by the 4-part Kubernetes x AWS series, 2026-12-02, us-east-1 ===
(the cluster was created once, used for all four parts, then deleted; account ID redacted)
##### 1) launch-a-kubernetes-cluster: eksctl create cluster (21:07:41 CST)
$ eksctl create cluster -f eksctl-cluster.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: nextwork-eks-cluster
region: us-east-1
tags: {Project: nextwork-launch-a-kubernetes-cluster}
vpc:
nat: {gateway: Disable} # no NAT Gateway (hourly fee): nodes live in public subnets
managedNodeGroups:
- name: nextwork-nodegroup
instanceType: t3.small # t3.micro only fits 4 pods per node on EKS
desiredCapacity: 3
tags: {Project: nextwork-launch-a-kubernetes-cluster}
2026-12-02 21:24:05 [ℹ] no tasks
2026-12-02 21:24:05 [✔] all EKS cluster resources for "nextwork-eks-cluster" have been created
2026-12-02 21:24:05 [ℹ] nodegroup "nextwork-nodegroup" has 3 node(s)
2026-12-02 21:24:05 [ℹ] node "ip-192-168-16-31.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-4-158.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-59-56.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] nodegroup "nextwork-nodegroup" has 3 node(s)
2026-12-02 21:24:05 [ℹ] node "ip-192-168-16-31.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-4-158.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-59-56.ec2.internal" is ready
2026-12-02 21:24:05 [✔] created 1 managed nodegroup(s) in cluster "nextwork-eks-cluster"
2026-12-02 21:24:05 [ℹ] creating addon: metrics-server
2026-12-02 21:24:06 [ℹ] successfully created addon: metrics-server
2026-12-02 21:24:07 [ℹ] kubectl command should work with "/tmp/eks-kubeconfig", try 'kubectl --kubeconfig=/tmp/eks-kubeconfig get nodes'
2026-12-02 21:24:07 [✔] EKS cluster "nextwork-eks-cluster" in "us-east-1" region is ready
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ip-192-168-16-31.ec2.internal Ready <none> 2m48s v1.37.1-eks-9adbfea 192.168.16.31 13.220.172.95 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
ip-192-168-4-158.ec2.internal Ready <none> 2m16s v1.37.1-eks-9adbfea 192.168.4.158 18.210.12.119 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
ip-192-168-59-56.ec2.internal Ready <none> 2m45s v1.37.1-eks-9adbfea 192.168.59.56 44.223.48.201 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
$ aws eks describe-cluster
1.37 ACTIVE eks.9
##### 2) set-up-kubernetes-deployment: build the Flask backend image and push it to Amazon ECR (21:24:10 CST)
$ aws ecr create-repository --repository-name nextwork-flask-backend
<ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/nextwork-flask-backend
Login Succeeded
sha256:8b4888299b6469e9969f6ffa0016667a752fd38f46a0b739b6b70cc1156bb4d6
c55c05421254: Pushed
latest: digest: sha256:e750eb2f01eb520ee9e900278f5fef476ad66344c6507339fa1ff171e76f1dc4 size: 2196
$ aws ecr describe-images --repository-name nextwork-flask-backend
latest 28708882 2026-12-02T21:24:24.215000-06:00
##### 3) create-kubernetes-manifests: validate the Deployment + Service against the live EKS API (server dry-run) (21:24:25 CST)
24: image: <ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/nextwork-flask-backend:latest # on EKS: <account>.dkr.ecr.<region>.amazonaws.com/nextwork-flask-backend:latest
$ kubectl apply --dry-run=server -f flask-deployment.yaml -f flask-service.yaml
deployment.apps/nextwork-flask-backend created (server dry run)
service/nextwork-flask-backend created (server dry run)
Teardown¶
The EKS session ran from 21:07 to 21:39 CST on 2026-12-02. eksctl delete cluster --wait removed the node group, the cluster and their CloudFormation stacks (VPC included), and the ECR repository was force-deleted with its images:
##### TEARDOWN (21:27:28 CST)
deployment.apps "nextwork-flask-backend" deleted
service "nextwork-flask-backend" deleted
$ eksctl delete cluster --name nextwork-eks-cluster --region us-east-1 --wait
2026-12-02 21:27:31 [✔] kubeconfig has been updated
2026-12-02 21:27:31 [ℹ] cleaning up AWS load balancers created by Kubernetes objects of Kind Service, Ingress, or Gateway
2026-12-02 21:27:32 [ℹ]
2 sequential tasks: { delete nodegroup "nextwork-nodegroup", delete cluster control plane "nextwork-eks-cluster"
}
2026-12-02 21:27:32 [ℹ] will delete stack "eksctl-nextwork-eks-cluster-nodegroup-nextwork-nodegroup"
2026-12-02 21:36:36 [ℹ] will delete stack "eksctl-nextwork-eks-cluster-cluster"
2026-12-02 21:38:58 [✔] all cluster resources were deleted
$ aws ecr delete-repository --repository-name nextwork-flask-backend --force
nextwork-flask-backend
$ verify: eks clusters / cfn stacks / ecr repos / tagged instances (should be empty)
##### teardown verified (21:39:07 CST)
Cost¶
Estimated cost of the whole EKS session, shared by the four projects: about $0.20 (a conservative estimate) (EKS control plane $0.10/hr, 3x t3.small at about $0.02/hr each, EBS and public IPv4 for well under an hour; ECR storage for minutes). The account has a $50/month budget with email alerts at $5, $20 and $40, and the whole AWS series is logged in a private spend ledger.
Original project: https://nextwork.ai/projects/ccc2aecf-ba9e-5ebe-98ec-e0c4aec9c4ea · Part of my NextWork Learning portfolio (hub).
Verification output¶
From docs/verification.txt:
$ ./ensure-cluster.sh && ./validate.sh
Summary: 2 resources found in 2 files - Valid: 2, Invalid: 0, Errors: 0, Skipped: 0
deployment.apps/nextwork-flask-backend created (server dry run)
service/nextwork-flask-backend created (server dry run)
PASS: manifests valid
Set kubectl context to "kind-nextwork-eks-cluster"
[exit code 0]