Google Antigravity Directory

The #1 directory for Google Antigravity prompts, rules, workflows & MCP servers. Optimized for Gemini 3 agentic development.

Resources

PromptsMCP ServersAntigravity RulesGEMINI.md GuideBest Practices

Company

Submit PromptAntigravityAI.directory

Popular Prompts

Next.js 14 App RouterReact TypeScriptTypeScript AdvancedFastAPI GuideDocker Best Practices

Legal

Privacy PolicyTerms of ServiceContact Us
Featured on FazierFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App ShowAI ToolzShinyLaunchMillion Dot HomepageSolver ToolsFeatured on FazierFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App ShowAI ToolzShinyLaunchMillion Dot HomepageSolver Tools

© 2026 Antigravity AI Directory. All rights reserved.

The #1 directory for Google Antigravity IDE

This website is not affiliated with, endorsed by, or associated with Google LLC. "Google" and "Gemini" are trademarks of Google LLC.

Antigravity AI Directory
PromptsMCPBest PracticesUse CasesLearn
Home
Prompts
Kubernetes Deployment Patterns

Kubernetes Deployment Patterns

Deploy Google Antigravity Next.js applications to Kubernetes with Helm charts, autoscaling, and production configurations.

kubernetesk8sdeploymentdevopshelm
by antigravity-team
⭐0Stars
.antigravity
# Kubernetes Deployment Patterns

Deploy your Google Antigravity Next.js applications to Kubernetes with best practices. This guide covers deployments, services, autoscaling, and Helm charts.

## Deployment Manifest

Create a production-ready deployment:

```yaml
# k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: antigravity-app
  labels:
    app: antigravity
spec:
  replicas: 3
  selector:
    matchLabels:
      app: antigravity
  template:
    metadata:
      labels:
        app: antigravity
    spec:
      containers:
        - name: app
          image: your-registry/antigravity:latest
          ports:
            - containerPort: 3000
          env:
            - name: NODE_ENV
              value: "production"
            - name: NEXT_PUBLIC_SUPABASE_URL
              valueFrom:
                secretKeyRef:
                  name: antigravity-secrets
                  key: supabase-url
            - name: NEXT_PUBLIC_SUPABASE_ANON_KEY
              valueFrom:
                secretKeyRef:
                  name: antigravity-secrets
                  key: supabase-anon-key
          resources:
            requests:
              cpu: "100m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "512Mi"
          livenessProbe:
            httpGet:
              path: /api/health
              port: 3000
            initialDelaySeconds: 10
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /api/health
              port: 3000
            initialDelaySeconds: 5
            periodSeconds: 5
      imagePullSecrets:
        - name: registry-credentials
```

## Service and Ingress

Expose the application with proper networking:

```yaml
# k8s/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: antigravity-service
spec:
  selector:
    app: antigravity
  ports:
    - protocol: TCP
      port: 80
      targetPort: 3000
  type: ClusterIP
---
# k8s/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: antigravity-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/proxy-body-size: "50m"
spec:
  tls:
    - hosts:
        - antigravityai.directory
      secretName: antigravity-tls
  rules:
    - host: antigravityai.directory
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: antigravity-service
                port:
                  number: 80
```

## Horizontal Pod Autoscaler

Scale based on CPU and memory:

```yaml
# k8s/hpa.yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: antigravity-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: antigravity-app
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
        - type: Percent
          value: 10
          periodSeconds: 60
    scaleUp:
      stabilizationWindowSeconds: 0
      policies:
        - type: Percent
          value: 100
          periodSeconds: 15
```

## Helm Chart Structure

Organize deployments with Helm:

```yaml
# charts/antigravity/values.yaml
replicaCount: 3

image:
  repository: your-registry/antigravity
  tag: latest
  pullPolicy: IfNotPresent

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - host: antigravityai.directory
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: antigravity-tls
      hosts:
        - antigravityai.directory

resources:
  limits:
    cpu: 500m
    memory: 512Mi
  requests:
    cpu: 100m
    memory: 256Mi

autoscaling:
  enabled: true
  minReplicas: 2
  maxReplicas: 10
  targetCPUUtilizationPercentage: 70

env:
  NODE_ENV: production

secrets:
  supabaseUrl: ""
  supabaseAnonKey: ""
```

## Deployment Script

Automate deployments:

```bash
#!/bin/bash
# deploy.sh

set -e

NAMESPACE="production"
RELEASE="antigravity"
CHART="./charts/antigravity"

# Build and push image
TAG=$(git rev-parse --short HEAD)
docker build -t your-registry/antigravity:$TAG .
docker push your-registry/antigravity:$TAG

# Deploy with Helm
helm upgrade --install $RELEASE $CHART \
  --namespace $NAMESPACE \
  --create-namespace \
  --set image.tag=$TAG \
  --set secrets.supabaseUrl=$SUPABASE_URL \
  --set secrets.supabaseAnonKey=$SUPABASE_ANON_KEY \
  --wait

echo "Deployed version $TAG"
```

## Best Practices

1. **Resource Limits**: Always set CPU and memory limits
2. **Health Checks**: Implement liveness and readiness probes
3. **Secrets Management**: Use Kubernetes secrets or external secret managers
4. **Rolling Updates**: Configure proper update strategies
5. **Pod Disruption Budgets**: Ensure availability during updates
6. **Monitoring**: Deploy Prometheus and Grafana for observability

When to Use This Prompt

This kubernetes prompt is ideal for developers working on:

  • kubernetes applications requiring modern best practices and optimal performance
  • Projects that need production-ready kubernetes code with proper error handling
  • Teams looking to standardize their kubernetes development workflow
  • Developers wanting to learn industry-standard kubernetes patterns and techniques

By using this prompt, you can save hours of manual coding and ensure best practices are followed from the start. It's particularly valuable for teams looking to maintain consistency across their kubernetes implementations.

How to Use

  1. Copy the prompt - Click the copy button above to copy the entire prompt to your clipboard
  2. Paste into your AI assistant - Use with Claude, ChatGPT, Cursor, or any AI coding tool
  3. Customize as needed - Adjust the prompt based on your specific requirements
  4. Review the output - Always review generated code for security and correctness
💡 Pro Tip: For best results, provide context about your project structure and any specific constraints or preferences you have.

Best Practices

  • ✓ Always review generated code for security vulnerabilities before deploying
  • ✓ Test the kubernetes code in a development environment first
  • ✓ Customize the prompt output to match your project's coding standards
  • ✓ Keep your AI assistant's context window in mind for complex requirements
  • ✓ Version control your prompts alongside your code for reproducibility

Frequently Asked Questions

Can I use this kubernetes prompt commercially?

Yes! All prompts on Antigravity AI Directory are free to use for both personal and commercial projects. No attribution required, though it's always appreciated.

Which AI assistants work best with this prompt?

This prompt works excellently with Claude, ChatGPT, Cursor, GitHub Copilot, and other modern AI coding assistants. For best results, use models with large context windows.

How do I customize this prompt for my specific needs?

You can modify the prompt by adding specific requirements, constraints, or preferences. For kubernetes projects, consider mentioning your framework version, coding style, and any specific libraries you're using.

Related Prompts

💬 Comments

Loading comments...