mchirico / kind

Scripts for getting started with Kind
MIT License
0 stars 0 forks source link
kind kubernetes kubernetes-deployment

Kind Calico Kind CertManager Kind Kudo Kind CertManager v1.19

kind

Example k8s clusters using kind, put into a Makefile.

Common Commands

Routing

kubectl get nodes -o=jsonpath='{range .items[*]}{"ip route add "}{.spec.podCIDR}{" via "}{.status.addresses[?(@.type=="InternalIP")].address}{"\n"}{end}'

Secrets

#!/bin/bash
ENDPOINTS='127.0.0.1:2379'
ETCDCTL_API=3 etcdctl \
       --endpoints=${ENDPOINTS} \
       --cacert="/etc/kubernetes/pki/etcd/ca.crt" \
       --cert="/etc/kubernetes/pki/apiserver-etcd-client.crt" \
       --key="/etc/kubernetes/pki/apiserver-etcd-client.key" \
       ${@}

Example usage:

etcdctl.sh get /registry/secrets/default/default-token-th4rf

Kind with Calico and Nginx Ingress

make calico

Example compiling kubernetes source with cert manager

make cert-manager-v1.19
kubectl exec -it node-starter-deploy-7d7b887466-gvrb7 -- /bin/sh

Trouble Shooting

docker exec -it kind-worker  /bin/bash
docker exec -it kind-control-plane  /bin/bash

# See tools below, for tools you'll need.

Prometheus

https://github.com/prometheus-operator/kube-prometheus

Tools

apt-get update
apt-get install net-tools
apt install bridge-utils
apt-get install -y tshark