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
type CustodianSQSNotification struct { | |
Account string `json:"account"` | |
AccountID string `json:"account_id"` | |
Action struct { | |
To []string `json:"to"` | |
Transport struct { | |
Queue string `json:"queue"` | |
Type string `json:"type"` | |
} `json:"transport"` | |
Type string `json:"type"` |
#!/bin/bash | |
# | |
######################################################################### | |
#This software code is made available "AS IS" without warranties of any # | |
#kind. You may copy, display, modify and redistribute the software # | |
#code either by itself or as incorporated into your code; provided that # | |
#you do not remove any proprietary notices. Your use of this software # | |
#code is at your own risk and you waive any claim against Amazon # | |
#Digital Services, Inc. or its affiliates with respect to your use of # | |
#this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its # |
#!/bin.bash | |
cd /tmp/kitchen | |
/opt/chef/embedded/bin/chef-zero -d | |
knife upload . -c client.rb | |
chef-shell -z --config client.rb -j dna.json |
# Filename: ProxyDisable.ps1 | |
# Requires an Elevated PowerShell | |
# Disable the Proxy (Global) | |
Set-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\' -Name 'ProxyEnable' -Value 0 | |
# Unset any Proxy Variables (Local) | |
$pvars=@('http_proxy','https_proxy', 'no_proxy') | |
foreach ($pvar in $pvars) { | |
Remove-Item "ENV:\${pvar}" -ErrorAction SilentlyContinue | |
} |
# => Find Certificate CN | |
cn = OpenSSL::X509::Certificate.new(::File.read('kc.crt')).subject.to_a.find { |c| c[0] == 'CN' }[1] |
# Filename: BerksFix.ps1 | |
# Brian Dwyer - 8/22/18 | |
$bad = 'gem "mixlib-archive", "= 0.4.6"' | |
$good = 'gem "mixlib-archive", "= 0.4.13"' | |
$berks_cache = Resolve-Path '~\.berkshelf\cookbooks' -ErrorAction SilentlyContinue | |
if ($berks_cache) { | |
'Clearing Berkshelf Cookbook Cache...' | |
Remove-Item -Recurse $berks_cache |
# Until an updated Rouge is released... | |
cd /opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/rouge-3.1.1/lib/rouge/lexers/ | |
wget https://raw.githubusercontent.com/jneen/rouge/master/lib/rouge/lexers/hcl.rb | |
wget https://raw.githubusercontent.com/jneen/rouge/master/lib/rouge/lexers/terraform.rb |
# Update to Latest Windows 10 Spring Refresh | |
# Install WSL | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
# Get Ubuntu installed - https://docs.microsoft.com/en-us/windows/wsl/install-on-server | |
wsl.exe | |
# Install ChefDK deb package |
#!/bin/bash | |
# Add git-crypt to SourceTree's Path | |
# If you use Sourcetree's embedded GIT, you may have to symlink things into its PATH to make them work. | |
# git-crypt | |
ln -s /usr/local/bin/git-crypt /Applications/SourceTree.app/Contents/Resources/bin/ |