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
function aws-sso-access-token() { | |
find "$HOME/.aws/sso/cache" -type f ! -name 'botocore*' -exec jq -r '.accessToken' {} \; | head -n1 | |
} | |
function aws-sso-list-accounts() { | |
aws sso list-accounts --access-token "$(aws-sso-access-token)" "$@" | |
} | |
function aws-sso-list-account-roles() { | |
aws sso list-account-roles --access-token "$(aws-sso-access-token)" "$@" |
--internal
flag is used, a linux type dummy
interface is dynamically created by Libnetwork to act as the parent. This network is completely isolated and is the equivalent to a --internal
flag. This is a good mode for demoing.Tools
Presentations
List of all my presentations over the past five years.
John Willis
Twitter: https://twitter.com/botchagalupe Linkedin https://www.linkedin.com/in/johnwillisatlanta
FROM golang:alpine AS build | |
ADD . /go/src/github.com/my/project | |
WORKDIR /go/src/github.com/my/project | |
RUN go build -o /mybinary ./cmd/mybinary | |
FROM alpine:latest | |
RUN apk add --no-cache ca-certificates | |
COPY --from=build /mybinary /mybinary | |
ENTRYPOINT ["/mybinary"] |
# Create | |
docker-machine create -d virtualbox local | |
eval "$(docker-machine env local)" | |
TOKEN_SWARM=$(docker run swarm create) | |
docker-machine create -d virtualbox mh-keystore | |
docker $(docker-machine config mh-keystore) run -d -p "8500:8500" -h "consul" progrium/consul -server -bootstrap | |
CREATE_MASTER_NODE="docker-machine create --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore):8500" -d virtualbox --swarm --swarm-master --swarm-discovery token://$TOKEN_SWARM swarm-master" | |
CREATE_NODE_01="docker-machine create --engine-label name=swarm-agent-00 --engine-label storage=ssd --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore):8500" -d virtualbox --swarm --swarm-discovery token://$TOKEN_SWARM swarm-agent-00" | |
CREATE_NODE_02="docker-machine create --engine-label name=swarm-agent-01 --engine-label storage=rust --engine-opt="cluster-advertise=eth1:2376" --engine-opt="cluster-store=consul://$(docker-m |