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
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: nginxx | |
| spec: | |
| selector: | |
| matchLabels: | |
| dsapp: nginxd | |
| template: | |
| metadata: |
| #!/bin/bash | |
| CLUSTERNAME=mycluster.mydomain | |
| NAMESPACE=default | |
| USERNAME=myclusteruser | |
| GROUPNAME=mygroup | |
| openssl genrsa -out ${USERNAME}.key 2048 | |
| CSR_FILE=$USERNAME.csr |
| echo -e "\x38\x01\x00\x00\x00\x00\x00\x00\x00" | timeout 10 nc -u <openvpnserver> 1194 | cat -v |
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| labels: | |
| component: alert-on-reboot-la | |
| name: alert-on-reboot-la | |
| namespace: kube-system | |
| spec: | |
| selector: | |
| matchLabels: |
| FROM alpine:3.11 AS build | |
| ARG CHANNEL=unstable | |
| ARG VERSION=0.99.1-127 | |
| ARG ARCH=amd64 | |
| RUN mkdir /build | |
| WORKDIR /build | |
| RUN apk add --no-cache curl tar |
| # Source: https://gist.github.com/0e28b2a9f10b2f643502f80391ca6ce8 | |
| #################### | |
| # Create a Cluster # | |
| #################### | |
| # This script assumes that you followed the instructions from the "Creating And Managing Google Kubernetes Engine (GKE) Clusters With Terraform" section" section. | |
| # It assumes that you have: | |
| # * The resource group *devops-catalog-aks* | |
| # * The storage account *devopscatalog* |
| #!/bin/sh | |
| # Source: http://kubernetes.io/docs/getting-started-guides/kubeadm | |
| set -e | |
| source /etc/lsb-release | |
| if [ "$DISTRIB_RELEASE" != "20.04" ]; then | |
| echo "################################# " | |
| echo "############ WARNING ############ " |