Skip to content

Instantly share code, notes, and snippets.

View rbankston's full-sized avatar

Ralph Bankston rbankston

  • Isovalent Formerly Engine Yard, Heptio, VMware, Astronomer
  • Lansing, MI
  • 22:46 (UTC -05:00)
  • X @ralphbankston
View GitHub Profile
#!/bin/bash -e
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name )
TEMPDIR=$( mktemp -d )
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' )
@so0k
so0k / kubectl.md
Last active February 19, 2026 16:57
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
#!/usr/bin/perl
use Cwd;
use File::Path;
my $tree = $ARGV[0];
sub saw ($) {
my($leaf) = @_;
my $cwd = getcwd;
@emboss
emboss / gist:2625014
Created May 6, 2012 23:39
TLS 1.1 & 1.2 test
OpenSSL:
./openssl s_client -connect google.com:443 -CAfile /etc/ssl/certs/ca-bundle.crt -tls1_2
CONNECTED(00000003)
139935467882144:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:340:
Ruby:
require 'socket'
require 'openssl'