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
| #!/bin/bash | |
| # Script to create full and incremental backups (for all databases on server) using innobackupex from Percona. | |
| # http://www.percona.com/doc/percona-xtrabackup/innobackupex/innobackupex_script.html | |
| # | |
| # (C)2017 Piotr Gbyliczek (p.gbyliczek at node4.co.uk) | |
| # - changed to use build in compression mechanism | |
| # - corrected restore process (restore from mixed compressed and uncompressed incrementals is supported as well) | |
| # - tidied up script a bit and added new checks | |
| # - removed unneeded xbstream usage (useful only for network transfers, not compatible with incremental backups) |
| import com.dtolabs.rundeck.plugins.notification.NotificationPlugin; | |
| import groovy.text.SimpleTemplateEngine | |
| /** | |
| * This plugin executes a curl command with some arguments as defined | |
| * by the user in the GUI. It wraps an invocation like shown below | |
| * | |
| * curl --user <your_jenkins_username>:<your_jenkins_API_key> http://<jenkins_job_url> | |
| * | |
| */ |
| # knife cheat | |
| ## Search Examples | |
| knife search "name:ip*" | |
| knife search "platform:ubuntu*" | |
| knife search "platform:*" -a macaddress | |
| knife search "platform:ubuntu*" -a uptime | |
| knife search "platform:ubuntu*" -a virtualization.system | |
| knife search "platform:ubuntu*" -a network.default_gateway |