deployment-infrastructure
Kubernetes deployment and infrastructure patterns
Best use case
deployment-infrastructure is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Kubernetes deployment and infrastructure patterns
Teams using deployment-infrastructure should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/deployment-infrastructure/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How deployment-infrastructure Compares
| Feature / Agent | deployment-infrastructure | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Kubernetes deployment and infrastructure patterns
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Deployment & Infrastructure Skill
Guide for deploying Splits Network services and apps.
## Purpose
- **Kubernetes**: Manifest patterns for services
- **Docker**: Multi-stage build optimization
- **CI/CD**: GitHub Actions workflows
- **Configuration**: Environment variables and secrets
## When to Use
- Deploying new services
- Creating Docker images
- Setting up CI/CD pipelines
- Managing Kubernetes resources
## Core Patterns
### 1. Kubernetes Deployment
```yaml
# infra/k8s/ats-service/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ats-service
namespace: splits-network
spec:
replicas: 2
selector:
matchLabels:
app: ats-service
template:
metadata:
labels:
app: ats-service
spec:
containers:
- name: ats-service
image: ghcr.io/splits-network/ats-service:latest
ports:
- containerPort: 3002
env:
- name: PORT
value: "3002"
- name: SUPABASE_URL
valueFrom:
secretKeyRef:
name: supabase-credentials
key: url
- name: SUPABASE_ANON_KEY
valueFrom:
secretKeyRef:
name: supabase-credentials
key: anon-key
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 3002
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 3002
initialDelaySeconds: 5
periodSeconds: 5
```
### 2. Kubernetes Service
```yaml
# infra/k8s/ats-service/service.yaml
apiVersion: v1
kind: Service
metadata:
name: ats-service
namespace: splits-network
spec:
selector:
app: ats-service
ports:
- protocol: TCP
port: 80
targetPort: 3002
type: ClusterIP
```
### 3. Multi-Stage Dockerfile
```dockerfile
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
COPY packages ./packages
COPY services/ats-service ./services/ats-service
# Install dependencies
RUN npm install -g pnpm
RUN pnpm install --frozen-lockfile
# Build
WORKDIR /app/services/ats-service
RUN pnpm build
# Production stage
FROM node:20-alpine AS runner
WORKDIR /app
# Copy built files
COPY --from=builder /app/services/ats-service/dist ./dist
COPY --from=builder /app/services/ats-service/package.json ./
COPY --from=builder /app/node_modules ./node_modules
# Run as non-root
USER node
EXPOSE 3002
CMD ["node", "dist/index.js"]
```
### 4. GitHub Actions Workflow
```yaml
# .github/workflows/deploy-ats-service.yml
name: Deploy ATS Service
on:
push:
branches: [main]
paths:
- 'services/ats-service/**'
- 'packages/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t ghcr.io/splits-network/ats-service:${{ github.sha }} \
-f services/ats-service/Dockerfile .
- name: Push to registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push ghcr.io/splits-network/ats-service:${{ github.sha }}
- name: Deploy to Kubernetes
run: |
kubectl set image deployment/ats-service \
ats-service=ghcr.io/splits-network/ats-service:${{ github.sha }} \
-n splits-network
```
### 5. Health Check Endpoints
```typescript
// services/ats-service/src/health.ts
export async function healthRoutes(app: FastifyInstance) {
// Liveness probe - is service running?
app.get('/health', async (request, reply) => {
return reply.send({ status: 'ok' });
});
// Readiness probe - can service handle traffic?
app.get('/ready', async (request, reply) => {
try {
// Check database connection
const { error } = await supabase.from('jobs').select('id').limit(1);
if (error) throw error;
return reply.send({ status: 'ready' });
} catch (error) {
return reply.code(503).send({ status: 'not ready' });
}
});
}
```
### 6. Environment Configuration
```typescript
// Kubernetes Secret
apiVersion: v1
kind: Secret
metadata:
name: supabase-credentials
namespace: splits-network
type: Opaque
stringData:
url: "https://einhgkqmxbkgdohwfayv.supabase.co"
anon-key: "eyJhbGc..."
service-role-key: "eyJhbGc..."
```
### 7. Ingress Configuration
```yaml
# infra/k8s/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: splits-network-ingress
namespace: splits-network
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- api.splits.network
secretName: api-tls
rules:
- host: api.splits.network
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-gateway
port:
number: 80
```
See [examples/](./examples/) and [references/](./references/).Related Skills
dotnet-container-deployment
Deploys .NET containers. Kubernetes probes, Docker Compose for local dev, CI/CD integration.
docker-deployment
Docker containerization and deployment for Java/Spring Boot applications. Multi-stage builds, docker-compose, health checks, and CI/CD with GitHub Actions.
devops-infrastructure
クラウドインフラ設計・IaC実装・監視設定・コンテナオーケストレーション。AWS、GCP、Azureのリソース構築、Terraform/Pulumi、Kubernetes、Docker、Prometheus/Grafana監視。「インフラ」「クラウド」「Terraform」「Kubernetes」「監視」「Docker」に関する質問で使用。
DevOps & Deployment
Use when setting up CI/CD pipelines, containerizing applications, deploying to Kubernetes, or writing infrastructure as code. DevOps & Deployment covers GitHub Actions, Docker, Helm, and Terraform patterns.
design-infrastructure
インフラ基盤構成設計エージェント - AWS/Azure/GCP/OpenShift向けのKubernetes・IaC構成を設計・生成。/design-infrastructure で呼び出し。
deployment-wizard
Deploy local websites to the internet instantly via Cloudflare Tunnel. Zero hosting, zero domain needed.
deployment-validation-config-validate
You are a configuration management expert specializing in validating, testing, and ensuring the correctness of application configurations. Create comprehensive validation schemas, implement configurat
deployment-safety
Pre-deployment checklists, rollback strategies, and post-deploy verification. Use this skill when preparing to deploy code, reviewing deployment processes, or setting up CI/CD pipelines.
deployment-procedures
Production deployment principles and decision-making.
deployment-playbook
Safe deployment steps and verification.
deployment-pipeline-design
Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration. Use when architecting deployment workflows, setting up continuous delivery, or implementing GitOps practices.
deployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.