Prompt Details
Model
(claude-4-7-opus)
Token size
465
Example input
[APP_REQUIREMENTS]: Node.js API on port 3000. Needs 3 initial replicas and health checks on /health.
[RESOURCE_LIMITS]: Requests: 128Mi RAM, 100m CPU. Limits: 512Mi RAM, 500m CPU.
[EXPOSURE_STRATEGY]: Nginx Ingress routing traffic from api.domain.com.
[TARGET_ENVIRONMENT]: AWS EKS
Example output
# Kubernetes Architecture Blueprint
## PHASE 1: ARCHITECTURE OVERVIEW
**Resource Summary:**
We are provisioning a full routing stack for a Node.js API:
- **Deployment:** Manages the Pods with 3 initial replicas, including strict resource boundaries and health checks.
- **Service:** A ClusterIP to provide internal load balancing across the Pods.
- **Ingress:** An NGINX Ingress resource to route external internet traffic from api.domain.com to the internal Service.
- **HPA:** Automatically scales pods between 3 and 10 based on CPU utilization.
## PHASE 2: DEPLOYMENT & SCALING MANIFESTS
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-api-deployment
labels:
app: node-api
spec:
replicas: 3
selector:
matchLabels:
app: node-api
template:
metadata:
labels:
app: node-api
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
containers:
- name: node-api
image: your-registry.com/node-api:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: node-api-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: node-api-deployment
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
## PHASE 3: NETWORKING & CONFIGURATION MANIFESTS
apiVersion: v1
kind: Service
metadata:
name: node-api-service
labels:
app: node-api
spec:
type: ClusterIP
selector:
app: node-api
ports:
- port: 80
targetPort: 3000
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: node-api-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
rules:
- host: api.domain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: node-api-service
port:
number: 80
## PHASE 4: DEPLOYMENT GUIDE
**Execution Steps:**
Save the generated YAML blocks into a file named k8s-manifests.yaml. Ensure your kubectl context is pointing to your EKS cluster.
1. Apply the configuration:
kubectl apply -f k8s-manifests.yaml
2. Verify the Deployment rollout:
kubectl rollout status deployment/node-api-deployment
3. Check the HPA metrics (may take a minute to gather stats):
kubectl get hpa node-api-hpa
4. Verify the Ingress IP assignment:
kubectl get ingress node-api-ingress
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-7-OPUS
Stop fighting with invalid YAML and broken deployments. This enterprise prompt acts as a Principal Cloud Native Architect, generating production-ready Kubernetes (K8s) manifests for your applications. It designs Deployments, Services, Ingress routes, ConfigMaps, and Horizontal Pod Autoscalers (HPA) aligned with cloud-native best practices. Designed to assist DevOps teams in deploying resilient workloads with proper resource limits, health checks, and security contexts. No hype, just perfectly st
...more
Added 1 week ago
