Skip to content

Instantly share code, notes, and snippets.

Ivan Pedrazas ipedrazas

Block or report user

Report or block ipedrazas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c1ff50b9e47ff8210d736f61cd3f6db9
helm ls --all --short | xargs -L1 helm delete --purge
ipedrazas /
Last active Jun 28, 2019
Kubernetes Applications checklist

Checklist: Application Readiness for Kubernetes

  • Not running latest
  • Readiness Checks
  • Liveness Checks
  • Metric/Telemetry instrumentation
  • Limits
  • Requests
  • Listen to signals (graceful shutdowns)
  • Labels
View gist:b375adf7e2f0bf83d229b1d8eafa0676
kubectl get all -o json \
| jq -cj '.items[] | tostring+"\u0000"' \
| xargs -n1 -0 -I@ bash -c "echo '@' | conftest test -"
View gist:8823b5d116cfcca6b36c8b8b7b5eb7ca
# Initialise a git project
git init .
# Initialise a git repo so that we can pull/push from/to it
git init --base master.git
# Run a Git Daemon
# CentOS
git daemon --verbose --base-path=/path/to/workspace/ --base-path-relaxed --reuseaddr --informative-errors --export-all
# Cygwin
git daemon --verbose --base-path=C:/path/to/workspace/ --base-path-relaxed --reuseaddr --informative-errors --export-all
# Then we can clone our local repo (the default port is 9418)
ipedrazas /
Created May 11, 2019 — forked from kevin-smets/
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry


Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!


View gist:f049725e441b8519a0e39164057259b2
echo "
apiVersion: extensions/v1beta1
kind: Ingress
annotations: /$1
name: rewrite
namespace: default
View gist:c93f255a17785a7eb7f2fd83af4c21a9

-> % svcs -n twistlock

NAME                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                      AGE
twistlock-console   ClusterIP   <none>        8084/TCP,8083/TCP,8081/TCP   18h

-> % k get ep -n twistlock

NAME                ENDPOINTS                                                  AGE
twistlock-console,,   18h
ipedrazas / gist:6edbd57ae813e999e78c475fbd6c3fe6
Created Feb 22, 2019
Add ServiceAccount to Deploymetn/Pod
View gist:6edbd57ae813e999e78c475fbd6c3fe6
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
ipedrazas / gist:403df2ed30ea8682e2b709ddc1c24bcf
Created Jan 23, 2019
curl internal service kubernetes kubectl proxy
View gist:403df2ed30ea8682e2b709ddc1c24bcf
# To call from outside the cluster a service type `ClusterIP`
# We use `kubectl proxy`
kubectl proxy
# Then, the service can be accessed by calling:
curl http://localhost:8001/api/v1/namespaces/status/services/x01-kstatus-api:5000/proxy/api/jobs
# This is
# curl http://localhost:8001/api/v1/namespaces/[NAMESPACE]/services/[SERVICE:PORT]/proxy/[QUERY_STRING]
View gist:5064a211c7217bbc28dc95820a383600
- /bin/sh
- -c
- |-
FATAL_ERRORS=$( echo "${LIVENESS_PROBE_FATAL_ERRORS}" | grep -q '\S' && \
grep -F "${LIVENESS_PROBE_FATAL_ERRORS}" /tmp/.liveness_probe )
cp /dev/null /tmp/.liveness_probe
if [ ! -z "${FATAL_ERRORS}" ]; then
You can’t perform that action at this time.