You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for node in $(kind get nodes --name $CLUSTER_NAME); do
kubectl annotate --overwrite node "${node}" "kind.x-k8s.io/registry=localhost:${reg_port}";
done
In kubernetes/dns repo:
make build && make containers
docker tag gcr.io/k8s-staging-dns/k8s-dns-node-cache-amd64:1.15.13-6-g5596a13-dirty localhost:5000/k8s-dns-node-cache:latest
docker push localhost:5000/k8s-dns-node-cache:latest
# change image to localhost:5000/k8s-dns-node-cache:latest and pullPolicy to Always
kubectl edit ds -n kube-system node-local-dns
# grant privileges to node-local-dns to be able to pull nodes
kubectl create clusterrolebinding node-local-dns-crb --clusterrole=cluster-admin --serviceaccount=kube-system:node-local-dns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -ti ${CLUSTER_NAME}-control-plane bash
# the rest of these commands are run from inside the docker container!
journalctl -flu kubelet
more /etc/kubernetes/manifests/etcd.yaml
crictl ps
more /kind/manifests/default-cni.yaml
more /kind/manifests/default-storage.yaml
# don't run these next two unless you know what you're doing! this will blow away your previous credentials
# kubeadm reset -f
# kubeadm init --config /kind/kubeadm.conf
more /etc/kubernetes/admin.conf
ls /var/log/containers/
Use docker ps or docker container list to find the container id of one of your KinD nodes:
✗ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
defc10620c4b kindest/node:latest "/usr/local/bin/entr…" 3 hours ago Up 3 hours 127.0.0.1:64168->6443/tcp kind-lat-control-plane
67fdaa647877 registry:2 "/entrypoint.sh /etc…" 2 weeks ago Up 9 days 0.0.0.0:5000->5000/tcp kind-registry
Exec into that container:
docker exec -ti defc10620c4b bash
Inside of the container:
apt-get update -y && apt-get install -y vim
vim /var/lib/kubelet/kubeadm-flags.env
# add ' --v=10' into the command string in /var/lib/kubelet/kubeadm-flags.env
systemctl restart kubelet.service
journalctl -flu kubelet
kubedns=$(kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP})
localdns=169.254.20.10
domain=cluster.local
# Mac os is weird: it needs the extra '' after the -i flag
sed -i '' "s/__PILLAR__LOCAL__DNS__/$localdns/g; s/__PILLAR__DNS__DOMAIN__/$domain/g; s/__PILLAR__DNS__SERVER__/$kubedns/g" nodelocaldns.yaml
kubectl create -f nodelocaldns.yaml