Pass kube-apiserver arguments with gravity cluster

I am using gravity to create a kubernetes cluster. Gravity automatically starts the kube-apiserver. Is it possible to pass extra arguments while starting kubeapi server? I tried adding the following to the cluster manifest but this did not work.

 systemOptions:   
     kube-apiserver:
        # List of additional command line args to provide to kubelet daemon
        args: ["--disable-admission-plugins=AlwaysPullImages"]

Hi @AhmedShahid,

Apologies on the delay of this. A couple of options that come to mind are:

  1. You can enter gravity shell edit /lib/systemd/system/kube-apiserver.service by adding the kube-apiserver args there, and then restart kube-apiserver. One thing to note though is adding directly to the unit file won’t survive the upgrades.

  2. You can extend the ClusterConfig with a section for each of the control plane components. Via the ClusterConfig, you can customize the cluster per environment before the installation. More details on that here

Unfortunately, neither ClusterConfiguration resource nor application manifest’s systemOptions supports relaying additional arguments to the api server.
For now the only options are:

  • create a custom system container with the options you need configured for the api server.
  • edit the options on the kube-apiserver service post-installation. This has the obvious drawback that these settings will not survive a cluster upgrade.