I want to use the kube-apiserver
to enable/disable admission controllers (e.g. kube-apiserver --enable-admission-plugins=NamespaceLifecycle
), but I cannot find it anywhere.
When I run the following, I don't see it anywhere:
# Running this:
kubectl get pods -n kube-system
# Shows only this:
# NAME READY STATUS RESTARTS AGE
# helm-install-traefik-fvs4z 0/1 Completed 0 10d
# local-path-provisioner-5ff76fc89d-rrntw 1/1 Running 4 10d
# coredns-854c77959c-vz4s2 1/1 Running 4 10d
# metrics-server-86cbb8457f-6kl5n 1/1 Running 4 10d
# svclb-traefik-cc7zx 2/2 Running 8 10d
# calico-kube-controllers-5dc5c9f744-6bwdj 1/1 Running 4 10d
# calico-node-xcjz8 1/1 Running 4 10d
# traefik-6f9cbd9bd4-b6nk7 1/1 Running 4 10d
I thought it might be due to using Calico, but even creating a cluster without Calico still shows no kube-apiserver
:
# Running this:
kubectl get pods -n kube-system
# Shows only this:
# NAME READY STATUS RESTARTS AGE
# local-path-provisioner-5ff76fc89d-d28gc 1/1 Running 0 2m31s
# coredns-854c77959c-lh78n 1/1 Running 0 2m31s
# metrics-server-86cbb8457f-xlzl2 1/1 Running 0 2m31s
# helm-install-traefik-nhxp4 0/1 Completed 0 2m31s
# svclb-traefik-hqndx 2/2 Running 0 2m21s
# traefik-6f9cbd9bd4-m42jg 1/1 Running 0 2m21s
Where is the kube-apiserver
? How do I enable and disable controllers in k3d?
For people coming by and searching for answer:
K3s runs all control-plane components in a single systemd process. If you need to add extra arguments to one of them, you need to pass through the
k3s.service
.For your example, in order to enable/disable admission controllers :
/etc/systemd/system/k3s.service
systemctl logs k3s.service
Hope it helps.
references: