Skip to content

Instantly share code, notes, and snippets.

View ernoaapa's full-sized avatar

Erno Aapa ernoaapa

View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: testing
name: testing
spec:
replicas: 1
selector:
matchLabels:
@ernoaapa
ernoaapa / list-failing-pods.sh
Last active March 26, 2024 14:07
Script to list all Kubernetes Pods what are NOT ready
#!/bin/sh
#
# Print Pods which are Pending or not Ready for some reaosn
#
kubectl get pods --all-namespaces -o go-template='{{ range $item := .items }}{{ range .status.conditions }}{{ if (or (and (eq .type "PodScheduled") (eq .status "False")) (and (eq .type "Ready") (eq .status "False"))) }}{{ $item.metadata.name}} {{ end }}{{ end }}{{ end }}'
@ernoaapa
ernoaapa / pod-spec-test.yml
Created October 13, 2017 10:01
pod spec test
metadata:
name: "foo"
spec:
containers:
- name: "foo"
image: "docker.io/eaapa/hello-world:latest"

Keybase proof

I hereby claim:

  • I am ernoaapa on github.
  • I am ernoaapa (https://keybase.io/ernoaapa) on keybase.
  • I have a public key ASA49QPvSpLDYXrD89SYsZ5IIvI-6MeAszdgS9DkCpsTrgo

To claim this, I am signing this object:

#!/bin/bash
#
# Install protobuf C++ library
# As described here: https://github.com/google/protobuf/blob/master/src/README.md#c-installation---unix
#
# NOTE:
# You should use 'libprotobuf10' package when it's available!
#
set -e
@ernoaapa
ernoaapa / fetch-github-organization-members-ssh-keys.sh
Last active March 3, 2016 05:41
Prints all GitHub organization users SSH keys. Can be used in automation to add github users to ~/.ssh/authorized_keys
#!/bin/bash
#
# Fetches all GitHub organization users SSH keys and print out
# Can be used to update ~/.ssh/authorized_keys file
#
# Eg.
# fetch-github-organization-members-ssh-keys.sh -o my-org -t TOKEN > ~/.ssh/authorized_keys
#
function parse_arguments() {

Keybase proof

I hereby claim:

  • I am ernoaapa on github.
  • I am ernoaapa (https://keybase.io/ernoaapa) on keybase.
  • I have a public key whose fingerprint is 812A E04B 88AF 10C2 89E8 D758 B085 CBF6 2216 6757

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am eaapa on github.
  • I am ernoaapa (https://keybase.io/ernoaapa) on keybase.
  • I have a public key whose fingerprint is 812A E04B 88AF 10C2 89E8 D758 B085 CBF6 2216 6757

To claim this, I am signing this object: