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
| #!/usr/bin/env python3 | |
| """Script locating the cheapest AWS GPU compute spot instance for docker.""" | |
| from argparse import ArgumentParser | |
| from datetime import datetime, timedelta | |
| from itertools import groupby | |
| from operator import itemgetter | |
| import boto3 | |
| import numpy as np |
| <!-- Code snippet --> | |
| <div class="form-group"> | |
| <div class="col-md-12 text-center"> | |
| <span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span> | |
| </div> | |
| </div> |
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |