Kind: Is there a way to customize the etcd compaction interval?

Created on 22 Mar 2020  路  2Comments  路  Source: kubernetes-sigs/kind

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!

kinsupport

Most helpful comment

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 馃槃

All 2 comments

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 :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tommyknows picture tommyknows  路  3Comments

philipstaffordwood picture philipstaffordwood  路  4Comments

ivanayov picture ivanayov  路  4Comments

BenTheElder picture BenTheElder  路  4Comments

figo picture figo  路  3Comments