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
| # http://technet.microsoft.com/en-us/library/ee692685.aspx | |
| # F7 = history | |
| # Alt+F7 = history -c | |
| # F8 = Ctrl+R | |
| Set-Location C: | |
| # Easier navigation | |
| Set-Alias o start | |
| function oo {start .} |
| #!/usr/bin/env zsh | |
| git show-branch -a \ | |
| | grep '\*' \ | |
| | grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| | head -n1 \ | |
| | sed 's/.*\[\(.*\)\].*/\1/' \ | |
| | sed 's/[\^~].*//' | |
| # How it works: |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> | |
| <!-- Send debug messages to System.out --> | |
| <appender name="OUTPUT" class="ch.qos.logback.core.ConsoleAppender"> | |
| <withJansi>true</withJansi> | |
| <encoder> | |
| <pattern>%date %highlight(%-5level) %cyan(%logger{5}@[%-4.30thread]) - %msg%n</pattern> |
| 1. Convert our ".jks" file to ".p12" (PKCS12 key store format): | |
| keytool -importkeystore -srckeystore oldkeystore.jks -destkeystore newkeystore.p12 -deststoretype PKCS12 | |
| 1.1. List new keystore file contents: | |
| keytool -deststoretype PKCS12 -keystore newkeystore.p12 -list | |
| 2. Extract pem (certificate) from ".p12" keysotre file: | |
| 1. Convert our ".jks" file to ".p12" (PKCS12 keystore format): | |
| keytool -importkeystore -srckeystore { java-keystore.jks } -destkeystore { pkcs12-keystore.p12 } -deststoretype PKCS12 | |
| 2. Extract pem (certificate) from ".p12" keystore file: | |
| openssl pkcs12 -nokeys -in { pkcs12-keystore.p12 } -out { certificate-chain.pem } | |
| 3. Extract unencrypted key file from ".p12" keystore file: | |
| openssl pkcs12 -nocerts -nodes -in { pkcs12-keystore.p12 } -out { unencrypted-key.key } |
People
:bowtie: |
๐ :smile: |
๐ :laughing: |
|---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
| mvn clean install -DskipTests -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/