Skip to content

Instantly share code, notes, and snippets.

Hassan Youssef hasusuf

Block or report user

Report or block hasusuf

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
@hasusuf
hasusuf / 01_extract_crt.rb
Created Jun 26, 2018 — forked from miry/01_extract_crt.rb
Extract certificate from the kubernetes config.
View 01_extract_crt.rb
require 'optparse'
require 'yaml'
require 'base64'
options = {
config_path: File.join(ENV['HOME'], '.kube', 'config'),
write_dir: File.join(ENV['HOME'], '.kube')
}
OptionParser.new do |opts|
@hasusuf
hasusuf / extract_kubecfg_cert.sh
Created Jun 26, 2018 — forked from xueshanf/extract_kubecfg_cert.sh
Extract kubernetes cluster credentials from kubecfg
View extract_kubecfg_cert.sh
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes
You can’t perform that action at this time.