I've been looking around for some way to customize the etcd compaction interval (which https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ suggests is defaulted to 5m). For a particular simulated workload, I'd like to change this to a smaller interval.
Is there a way to do so? I am not familiar with kubeadm configs -- maybe this is supported via Cluster config's kubeadmConfigPatches and/or containerdConfigPatches.
If someone has any ideas, that would be appreciated. Thanks!
Edit it manually, which will auto-refresh the apiserver
docker exec -it kind-control-plane bash
apt-get update && apt-get -y install vim
vi /etc/kubernetes/manifests/kube-apiserver.yaml
spec:
containers:
- command:
- kube-apiserver
- --etcd-compaction-interval=10m
Or via kubeadmConfigPatches, quick reference here and k8s docs here:
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
kubeadmConfigPatches:
- |
# v1beta2 only works for 1.15+
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
metadata:
name: config
apiServer:
extraArgs:
etcd-compaction-interval: "10m"
Hope that helps 馃槃
@nikhilk the above comment should do what you want :-)
Most helpful comment
Edit it manually, which will auto-refresh the apiserver
Or via kubeadmConfigPatches, quick reference here and k8s docs here:
Hope that helps 馃槃