// Comprehensive Kubernetes, Helm, and OpenShift operations skill. Use for creating production-ready K8s manifests, Helm charts, security policies, RBAC configurations, and OpenShift-specific resources. Also triggers when working with Kubernetes YAML files (.yaml, .yml), Helm chart files (Chart.yaml, values.yaml), or container orchestration configuration. Example triggers: "Create Kubernetes deployment", "Write Helm chart", "Set up RBAC", "Create K8s manifest", "Deploy to Kubernetes", "Configure OpenShift", "Add security policy"
| name | rr-kubernetes |
| description | Comprehensive Kubernetes, Helm, and OpenShift operations skill. Use for creating production-ready K8s manifests, Helm charts, security policies, RBAC configurations, and OpenShift-specific resources. Also triggers when working with Kubernetes YAML files (.yaml, .yml), Helm chart files (Chart.yaml, values.yaml), or container orchestration configuration. Example triggers: "Create Kubernetes deployment", "Write Helm chart", "Set up RBAC", "Create K8s manifest", "Deploy to Kubernetes", "Configure OpenShift", "Add security policy" |
Comprehensive skill for professional Kubernetes operations covering manifest generation, Helm chart development, security policy implementation, and OpenShift-specific patterns. Provides production-ready templates, security-first practices, and multi-environment deployment strategies.
Automatically activate when:
.yaml/.yml Kubernetes manifestsChart.yaml, values.yaml present)Follow the ten-step workflow from references/k8s-manifests.md:
Quick Start:
# Generate a complete application stack
bash scripts/generate_manifest.sh my-app nodejs 3000
Manual Creation - Production-Ready Deployment:
Use templates from assets/deployment-template.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
labels:
app: my-app
version: v1.0.0
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
version: v1.0.0
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: my-app
image: my-app:1.0.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
Validation before apply:
kubectl apply -f manifests/ --dry-run=client
kubectl apply -f manifests/ --dry-run=server
kubeval manifests/*.yaml
kube-linter lint manifests/
Follow chart scaffolding patterns from references/helm-charts.md:
Initialize new chart:
helm create my-app
# Or use scaffold script
bash scripts/scaffold_helm_chart.sh my-app nodejs
Chart.yaml example:
apiVersion: v2
name: my-app
description: A production-ready application
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: postgresql
version: 12.x.x
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
Helm workflow:
helm lint my-app/
helm template my-app my-app/ --values my-app/values.yaml
helm install my-app my-app/ --dry-run --debug
helm install my-app my-app/ --namespace my-namespace --create-namespace
helm upgrade --install my-app my-app/ --namespace my-namespace
Follow security-first patterns from references/security-policies.md:
Pod Security Standards:
apiVersion: v1
kind: Namespace
metadata:
name: production
labels:
pod-security.kubernetes.io/enforce: restricted
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/warn: restricted
Network Policies:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
spec:
podSelector: {}
policyTypes:
- Ingress
RBAC Configuration:
apiVersion: v1
kind: ServiceAccount
metadata:
name: my-app
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: my-app-role
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: my-app-binding
subjects:
- kind: ServiceAccount
name: my-app
roleRef:
kind: Role
name: my-app-role
apiGroup: rbac.authorization.k8s.io
Follow OpenShift patterns from references/openshift.md:
Route (OpenShift's Ingress):
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: my-app
spec:
host: my-app.apps.cluster.example.com
to:
kind: Service
name: my-app
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
OpenShift commands:
oc new-project my-app
oc new-app nodejs:16~https://github.com/example/my-app
oc expose svc/my-app
oc get route my-app
Directory structure:
k8s/
โโโ base/
โ โโโ deployment.yaml
โ โโโ service.yaml
โ โโโ kustomization.yaml
โโโ overlays/
โโโ dev/
โโโ staging/
โโโ production/
Using Kustomize:
kubectl kustomize k8s/overlays/production
kubectl apply -k k8s/overlays/production
Helm values per environment:
helm upgrade --install my-app ./my-app -f values-prod.yaml
helm upgrade --install my-app ./my-app -f values-prod.yaml --set image.tag=1.2.3
Pre-apply checklist:
kubectl apply -f manifests/ --dry-run=client -o yaml
kubeval manifests/*.yaml
kube-linter lint manifests/
helm lint my-chart/
helm template my-release my-chart/ --debug
Post-apply verification:
kubectl get pods -n my-namespace
kubectl get events -n my-namespace --sort-by='.lastTimestamp'
kubectl logs -n my-namespace deployment/my-app
kubectl describe deployment my-app -n my-namespace
From references/kubectl-commands.md:
kubectl apply -f manifest.yaml
kubectl get pods
kubectl describe pod my-pod
kubectl logs my-pod
kubectl exec -it my-pod -- /bin/sh
kubectl port-forward pod/my-pod 8080:80
helm list
helm status my-release
helm rollback my-release 1
From references/security-policies.md:
restricted level to production namespaceslatest tag, scan images regularlygenerate_manifest.sh - Generate complete K8s manifest setsscaffold_helm_chart.sh - Scaffold production-ready Helm chartsvalidate_manifests.sh - Validate manifests before applyingk8s-manifests.md - Complete manifest generation guide with ten-step workflowhelm-charts.md - Helm chart structure, templating, and best practicessecurity-policies.md - Security policies, RBAC, and hardening guidesopenshift.md - OpenShift-specific resources and patternskubectl-commands.md - kubectl and helm command referencedeployment-template.yaml - Production-ready Deployment templateservice-templates.yaml - ClusterIP, NodePort, LoadBalancer exampleshelm-chart-template/ - Complete Helm chart boilerplatenetwork-policy-examples.yaml - Common network policy patternsrbac-templates.yaml - ServiceAccount, Role, RoleBinding examplesopenshift-templates.yaml - Route, DeploymentConfig, ImageStream examplesComplete workflow for deploying a new microservice:
kubectl apply --dry-run=clientkube-linter lint manifests/kubectl apply -k overlays/devlatest, use semantic versioning