0% found this document useful (0 votes)
57 views3 pages

Steps To Solve Were: 1. Check If You Have Files Kubelet - Service and 10-Kubeadm - Conf On The Next Paths

The document provides steps to solve issues with raising kubelet on a Kubernetes node. It involves checking for configuration files, removing the old kubelet.service unit, reloading systemd, and restarting kubelet. The output should then show kubelet loaded and using the new 10-kubeadm.conf drop-in configuration file. Additional steps reset the control plane and reinitialize it to configure the pod network.

Uploaded by

Anabel Gomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views3 pages

Steps To Solve Were: 1. Check If You Have Files Kubelet - Service and 10-Kubeadm - Conf On The Next Paths

The document provides steps to solve issues with raising kubelet on a Kubernetes node. It involves checking for configuration files, removing the old kubelet.service unit, reloading systemd, and restarting kubelet. The output should then show kubelet loaded and using the new 10-kubeadm.conf drop-in configuration file. Additional steps reset the control plane and reinitialize it to configure the pod network.

Uploaded by

Anabel Gomez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Para levantar kubelet

Steps to solve were: 1. check if you have files kubelet.service and 10-kubeadm.conf on
the next paths:

ls /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
ls /usr/lib/systemd/system/kubelet.service
10-kubeadm.conf:

more /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf

# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-
kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the
KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user
should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead.
KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/sysconfig/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS
$KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
kubelet.service:

more /usr/lib/systemd/system/kubelet.service

[Unit]
Description=Kubernetes Kubelet Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=docker.service
Requires=docker.service

[Service]
WorkingDirectory=/var/lib/kubelet
EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/kubelet
ExecStart=/usr/bin/kubelet \
$KUBE_LOGTOSTDERR \
$KUBE_LOG_LEVEL \
$KUBELET_API_SERVER \
$KUBELET_ADDRESS \
$KUBELET_PORT \
$KUBELET_HOSTNAME \
$KUBE_ALLOW_PRIV \
$KUBELET_ARGS
Restart=on-failure
KillMode=process

[Install]
WantedBy=multi-user.target
2. Delete systemd unit for kubelet in /etc/systemd/system/
3. rm -R /etc/systemd/system/kubelet.service.d (confirm "y" for each file)
4. rm /etc/systemd/system/kubelet.service
5. Reload all systemd unit files, and recreate the entire dependency tree.

6. restart kubelet

systemctl restart kubelet


The output of kubelet status then should contain:

Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)


Drop-In: /usr/lib/systemd/system/kubelet.service.d
└─10-kubeadm.conf
5. Initialize a Kubernetes control-plane node:
6. kubeadm reset
7. systemctl daemon-reload
kubeadm init --pod-network-cidr=10.244.0.0/16

actualizar las herramientas

sudo apt install net-tools


}

Verificar puertos en uso


$ rmen
tcp6 0 0 :::10251 :::* LISTEN
4366/kube-scheduler
tcp6 0 0 :::10252 :::* LISTEN
4353/kube-controlle
$ kill 4366
$ kill 4353

You might also like