Skip to content

Instantly share code, notes, and snippets.

@ifnazar
Last active October 16, 2019 17:57
Show Gist options
  • Save ifnazar/52878bed5a9b2d0ab835f418d95a19ca to your computer and use it in GitHub Desktop.
Save ifnazar/52878bed5a9b2d0ab835f418d95a19ca to your computer and use it in GitHub Desktop.
Kubernets

Commands

kubectl apply -f deployment.yaml

kubectl rollout status deployment myapp

Readiness probes -> examine how the application is doing

readinessProbe:
  httpGet:
    path: /
    port: 3000

Scripting automated rollback

kubectl apply -f myapp.yaml
if ! kubectl rollout status deployment myapp; then
    kubectl rollout undo deployment myapp
    kubectl rollout status deployment myapp
    exit 1
fi
echo $(kubectl get pod dns-demo-2 --template={{.status.podIP}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment