Skip to main content
Glama
setup.sh1.46 kB
#!/usr/bin/env bash # Delete namespace if exists and create a fresh one kubectl delete namespace orders --ignore-not-found kubectl create namespace orders TIMEOUT="120s" # Create a deployment with problematic health checks cat <<YAML | kubectl apply -f - apiVersion: apps/v1 kind: Deployment metadata: name: webapp namespace: orders spec: replicas: 1 selector: matchLabels: app: webapp template: metadata: labels: app: webapp spec: containers: - name: webapp image: nginx:latest ports: - containerPort: 80 # The problem: incorrect health probes causing restarts livenessProbe: httpGet: path: /get_status port: 80 initialDelaySeconds: 5 periodSeconds: 5 readinessProbe: httpGet: path: /is_ready port: 80 initialDelaySeconds: 5 periodSeconds: 5 YAML # Create a service for the webapp kubectl create service clusterip webapp -n orders --tcp=80:80 # Wait for the pod to start and begin restarting due to failed probes echo "Waiting for pod to start and begin failing health checks..." if ! kubectl wait --for=condition=Available=False --timeout=$TIMEOUT deployment/webapp -n orders; then echo "Error: Timed out waiting for the deployment to become unavailable." exit 1 fi echo "Setup successful: Deployment is no longer available." exit 0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/containers/kubernetes-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server