This file contains hidden or 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
kubectl -n source-namespace get secret some-secret -o yaml --export | kubectl -n dest-namespace apply -f - |
This file contains hidden or 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
kubectl get secret some-cert -o json | jq -r '.data."tls.crt" | @base64d ' | openssl x509 -text -noout |
This file contains hidden or 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
kubectl get secret my-user-pass -o json | jq '.data | map_values(@base64d)' |
This file contains hidden or 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
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/polipo_1.1.1-8_amd64.deb | |
sudo dpkg -i polipo_1.1.1-8_amd64.deb |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
echo "cloudfront_ips = <<-EOF" > $DIR/cloudfront_ips.auto.tfvars && curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="ROUTE53" or .service=="CLOUDFRONT") | .ip_prefix' >> $DIR/cloudfront_ips.auto.tfvars && echo EOF >> $DIR/cloudfront_ips.auto.tfvars |
This file contains hidden or 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
kubectl get ingress -A -o jsonpath='{range .items[?(@.metadata.annotations.nginx\.ingress\.kubernetes\.io/enable-modsecurity=="true")]}{.metadata.namespace}{"\t"}{.metadata.name}{"\n"}{end}' |