KUBERNETES: How To Check & Edit ConfigMaps In Kube-System Namespace
For checking all the config maps in kube-system name space, run below command.
kubectl get cm -n kube-system
Below is sample output.
$ kubectl get cm -n kube-system
NAME DATA AGE
coredns 1 24d
extension-apiserver-authentication 6 24d
kube-flannel-cfg 2 24d
kube-proxy 2 24d
kube-root-ca.crt 1 24d
kubeadm-config 2 24d
kubelet-config 1 14d
kubelet-config-1.21 1 24d
kubelet-config-1.22 1 14d
kubelet-config-1.23 1 14d
To view configmap for specific configmap name, use below command. Replace kubelet-config-1.21 with name of config map you want to view.
kubectl describe configmaps kubelet-config-1.21 -n kube-system
Below is sample output.
$ kubectl edit cm kubelet-config-1.21 -n kube-system
Edit cancelled, no changes made.
[opc@cne14-control1 ~]$ kubectl describe configmaps kubelet-config-1.21 -n kube-system
Name: kubelet-config-1.21
Namespace: kube-system
Labels: <none>
Annotations: kubeadm.kubernetes.io/component-config.hash: sha256:8912bdfe80280dffc9e637149eb28ce3727d3d140cb1e7d43174177989e59620
Data
====
kubelet:
----
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
anonymous:
enabled: false
webhook:
cacheTTL: 0s
enabled: true
x509:
clientCAFile: /etc/kubernetes/pki/ca.crt
authorization:
mode: Webhook
webhook:
cacheAuthorizedTTL: 0s
cacheUnauthorizedTTL: 0s
cgroupDriver: systemd
clusterDNS:
- 10.XX.XX.10
clusterDomain: cluster.local
cpuManagerReconcilePeriod: 0s
evictionPressureTransitionPeriod: 0s
fileCheckFrequency: 0s
healthzBindAddress: 127.0.0.1
healthzPort: 10248
httpCheckFrequency: 0s
imageMinimumGCAge: 0s
kind: KubeletConfiguration
logging: {}
nodeStatusReportFrequency: 0s
nodeStatusUpdateFrequency: 0s
rotateCertificates: true
runtimeRequestTimeout: 0s
shutdownGracePeriod: 0s
shutdownGracePeriodCriticalPods: 0s
staticPodPath: /etc/kubernetes/manifests
streamingConnectionIdleTimeout: 0s
syncFrequency: 0s
volumeStatsAggPeriod: 0s
BinaryData
====
Events: <none>
To Edit configmap run below command.
kubectl edit cm kubelet-config-1.21 -n kube-system
No comments:
Post a Comment