apiVersion: apps/v1
kind: Deployment
metadata:
name: tpd
spec:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ terraform init | |
Initializing modules... | |
- eun1 in module | |
- euw2 in module | |
- use1 in module | |
Initializing the backend... | |
Initializing provider plugins... | |
- Finding hashicorp/aws versions matching "~> 4.27.0"... |
$ sudo mkdir -p /etc/systemd/system/systemd-networkd.service.d/
$ sudo cat > /etc/systemd/system/systemd-networkd.service.d/05-enable-debugging.conf << _EOF
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red | |
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red | |
highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red | |
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show containers in 'exited' state created more than 10 days ago (240 hours) | |
# change STATE to the requested container state, can be 'exited', 'created' or 'running' | |
# change HOURS to the requested time in hours | |
docker container ls -a --format \ | |
'HOURS=240; STATE=exited; TIME_CREATED="{{.CreatedAt}}"; | |
if [[ {{.State}} = $STATE ]]; then | |
TIME_CREATED=$(date -d "${TIME_CREATED% *}" +%s); | |
TIME_POINT=$(($(date '+%s')-$HOURS*3600)); | |
if [[ $TIME_CREATED -lt $TIME_POINT ]] ; then | |
echo "{{.ID}}|{{.Names}}|{{.RunningFor}}" ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate RSA private key | |
openssl genrsa -out 01-key.pem | |
# get corresponding public key | |
openssl pkey -in 01-key.pem -inform pem -out 02-pub.pem -outform pem -pubout | |
# get JWT header | |
echo -n '{"alg":"RS256","typ":"JWT"}' > 03-header.json | |
# make sure the content doesn't have trailing newline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws route53 list-hosted-zones | jq '.HostedZones[].Id' | tr -d '"' | while read zone ; do | |
echo "== $zone" | |
aws route53 list-resource-record-sets --hosted-zone-id $zone --query "ResourceRecordSets[?Type == 'A']" | \ | |
grep '"Name":\|DNSName\|Value' | \ | |
sed -e 's/ //g' | \ | |
sed -n -f route53.sed | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $(mktemp -d) | |
# `./config` - existent kubeconfig to merge to (like ~/.kube/config) | |
# `./configToAdd` - new kubeconfig to merge from | |
cat <<_EOF_ > ./config | |
apiVersion: v1 | |
clusters: | |
- cluster: | |
certificate-authority-data: MQo= |
NewerOlder