Skip to content

Instantly share code, notes, and snippets.

View xtophs's full-sized avatar

Christoph Schittko xtophs

View GitHub Profile
@xtophs
xtophs / keep-ubuntu-running-in-k8s.md
Last active July 10, 2023 11:48
Keep Ubuntu running in Kubernetes

Keep an Ubuntu container running in a Kubernetes cluster

Sometimes you just need a container that keeps shell running in a kubernetes cluster. It's very handy to debug or to open an ssh tunnel into the container network.

Unfortunately, the ubtuntu or busybox contianers from Docker Hub exit, but this little trick starts the container with a never-ending, ye low CPU consumption tail -f.

Now you can kubectl exec -it into the container, which always maintains context.

---
@xtophs
xtophs / azure-standard-lb.md
Last active August 15, 2018 18:35
k8s cluster with standard LB

Testing Standard LB Cloud Provider

  1. Create cluster ARM template with acs-engine
acs-engine generate ...
  1. Configure template to use custom hyperkube. Edit to match
 "kubernetesHyperkubeSpec": {
@xtophs
xtophs / kubedns-loglevel.md
Created March 8, 2018 16:29
Changing kubernetes kubedns loglevel

Changing System Pods Log Level

Deployment yaml files for kubernetes system services are typically found in /etc/kubernetes/manifests. The yaml files for addons like kubedns, kube proxy, tiller, etc can be found in /etc/kubernetes/addons.

Kube DNS Default

The default kubedns loglevel is 2, are you can see from looking at the logs for a kubedns pod.

$ kubectl logs kube-dns-v20-597689868c-9l29r kubedns --namespace=kube-system