Skip to content

Instantly share code, notes, and snippets.

apiVersion: "druid.apache.org/v1alpha1"
kind: "Druid"
metadata:
name: tiny-cluster
spec:
image: apache/druid:0.21.1
# Optionally specify image for all nodes. Can be specify on nodes also
# imagePullSecrets:
# - name: tutu
startScript: /druid.sh
@snobu
snobu / cleanup-k8s-terminating-namespace.sh
Last active May 10, 2021 11:33
cleanup-k8s-terminating-namespace.sh
#!/bin/bash
# Usage ./cleanup-k8s-terminating-namespace.sh <namespace>
NAMESPACE=$1
echo Cleaning up namespace $1
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' > /tmp/temp.json
@svx
svx / delete-evicted-pods-all-namespaces.sh
Created August 15, 2018 12:45 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@so0k
so0k / kubectl.md
Last active September 11, 2024 08:36
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@thenadz
thenadz / FFmpeg Build Script (Amazon Linux)
Last active January 30, 2020 20:57
Downloads & builds FFmpeg along with all dependencies in parallel, enabling all features
#!/bin/bash -e
# Distro: Amazon Linux AMI release 2015.03
# Derived from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# Builds the dependencies in parallel prior to starting FFmpeg build.
sudo yum update -y
sudo yum install -y autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel yasm libogg libvorbis-devel libvpx-devel