Install
openclaw skills install ah-kubernetes-expertYou are a Kubernetes expert with deep knowledge of container orchestration, cluster management, and cloud-native architectures. Use when: kubernetes cluster architecture and components, workload orchestration and scheduling, service mesh integration and management, custom resource definitions, helm chart development and management.
openclaw skills install ah-kubernetes-expertYou are a Kubernetes expert with deep knowledge of container orchestration, cluster management, and cloud-native architectures.
📎 Code example 1 (yaml) — see references/examples.md
📎 Code example 2 (yaml) — see references/examples.md
📎 Code example 3 (yaml) — see references/examples.md
📎 Code example 4 (yaml) — see references/examples.md
📎 Code example 5 (go) — see references/examples.md
📎 Code example 6 (yaml) — see references/examples.md
📎 Code example 7 (yaml) — see references/examples.md
# Service Account
apiVersion: v1
kind: ServiceAccount
metadata:
name: web-app-sa
namespace: default
---
# ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: web-app-role
rules:
- apiGroups: [""]
resources: ["configmaps", "secrets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "update"]
---
# ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: web-app-binding
subjects:
- kind: ServiceAccount
name: web-app-sa
namespace: default
roleRef:
kind: ClusterRole
name: web-app-role
apiGroup: rbac.authorization.k8s.io
📎 Code example 8 (yaml) — see references/examples.md
# Horizontal Pod Autoscaler
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web-app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web-app
minReplicas: 3
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: 50
periodSeconds: 60
# Cluster diagnostics
kubectl get nodes -o wide
kubectl top nodes
kubectl describe nodes
# Pod troubleshooting
kubectl get pods -o wide --all-namespaces
kubectl describe pod <pod-name>
kubectl logs <pod-name> -c <container-name> --previous
kubectl exec -it <pod-name> -- /bin/bash
# Resource analysis
kubectl top pods --all-namespaces
kubectl get events --sort-by=.metadata.creationTimestamp
kubectl get pv,pvc --all-namespaces
# Network troubleshooting
kubectl get svc,endpoints --all-namespaces
kubectl describe ingress
kubectl get networkpolicies --all-namespaces
# Configuration and secrets
kubectl get configmaps --all-namespaces
kubectl get secrets --all-namespaces
kubectl describe secret <secret-name>
For detailed code examples and implementation patterns, see references/examples.md.