You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubeadm is the reference installer for Kubernetes that sets up a minimally viable Kubernetes cluster using some best practices. It simplifies the initialization of control plane nodes, the addition (or removal) of nodes to a Kubernetes cluster, and also handles control plane and Kubelet configuration updates.
9
-
10
-
Kubeadm has a variety of commands and subcommands that will allow you to:
This error occurs because the `bridge-nf-call-iptables` is not enabled, which is necessary for the iptables proxy to see bridged traffic properly. You need to enable this setting to ensure that network packets are properly forwarded by the host.
50
-
51
-
**Enable `bridge-nf-call-iptables`**:
52
-
1. Load the `br_netfilter` module:
53
-
```bash
54
-
sudo modprobe br_netfilter
55
-
```
56
-
2. Set `bridge-nf-call-iptables` to 1:
57
-
```bash
58
-
sudo sysctl net.bridge.bridge-nf-call-iptables=1
59
-
```
60
-
3. To make this change persistent across reboots, add it to your sysctl configuration:
61
-
```bash
62
-
echo"net.bridge.bridge-nf-call-iptables=1"| sudo tee -a /etc/sysctl.conf
63
-
```
64
-
65
-
### 2. **IP Forwarding Not Enabled**
66
-
Kubernetes requires IP forwarding to be enabled to allow containers to communicate with each other and the outside world.
67
-
68
-
**Enable IP forwarding**:
69
-
1. Set IP forwarding to 1:
70
-
```bash
71
-
sudo sysctl net.ipv4.ip_forward=1
72
-
```
73
-
2. To make this setting permanent:
74
-
```bash
75
-
echo"net.ipv4.ip_forward=1"| sudo tee -a /etc/sysctl.conf
76
-
```
77
-
3. Apply the sysctl settings:
78
-
```bash
79
-
sudo sysctl -p
80
-
```
81
-
82
-
### Final Steps
83
-
After making these changes, re-run your `kubeadm init` command to proceed with the Kubernetes initialization:
These settings will ensure that your system is configured correctly for network traffic management, which is essential for a Kubernetes cluster to function properly. If you continue to experience issues or encounter new errors, rechecking the configurations and ensuring all prerequisites are met before initializing Kubernetes can be helpful.
I0418 14:20:15.325900 51055 version.go:256] remote version is much newer: v1.30.0; falling back to: stable-1.29
98
-
[init] Using Kubernetes version: v1.29.4
99
-
[preflight] Running pre-flight checks
100
-
[preflight] Pulling images required for setting up a Kubernetes cluster
101
-
[preflight] This might take a minute or two, depending on the speed of your internet connection
102
-
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
103
-
W0418 14:20:38.012478 51055 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.8" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image.
104
-
[certs] Using certificateDir folder "/etc/kubernetes/pki"
105
-
[certs] Generating "ca" certificate and key
106
-
[certs] Generating "apiserver" certificate and key
107
-
[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local sangam] and IPs [10.96.0.1 192.168.129.135]
108
-
[certs] Generating "apiserver-kubelet-client" certificate and key
109
-
[certs] Generating "front-proxy-ca" certificate and key
110
-
[certs] Generating "front-proxy-client" certificate and key
111
-
[certs] Generating "etcd/ca" certificate and key
112
-
[certs] Generating "etcd/server" certificate and key
113
-
[certs] etcd/server serving cert is signed for DNS names [localhost sangam] and IPs [192.168.129.135 127.0.0.1 ::1]
114
-
[certs] Generating "etcd/peer" certificate and key
115
-
[certs] etcd/peer serving cert is signed for DNS names [localhost sangam] and IPs [192.168.129.135 127.0.0.1 ::1]
116
-
[certs] Generating "etcd/healthcheck-client" certificate and key
117
-
[certs] Generating "apiserver-etcd-client" certificate and key
118
-
[certs] Generating "sa" key and public key
119
-
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
126
-
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
127
-
[control-plane] Creating static Pod manifest for "kube-apiserver"
128
-
[control-plane] Creating static Pod manifest for "kube-controller-manager"
129
-
[control-plane] Creating static Pod manifest for "kube-scheduler"
130
-
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
131
-
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
132
-
[kubelet-start] Starting the kubelet
133
-
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
134
-
[apiclient] All control plane components are healthy after 7.004807 seconds
135
-
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
136
-
[kubelet] Creating a ConfigMap "kubelet-config" in namespace kube-system with the configuration for the kubelets in the cluster
137
-
[upload-certs] Skipping phase. Please see --upload-certs
138
-
[mark-control-plane] Marking the node sangam as control-plane by adding the labels: [node-role.kubernetes.io/control-plane node.kubernetes.io/exclude-from-external-load-balancers]
139
-
[mark-control-plane] Marking the node sangam as control-plane by adding the taints [node-role.kubernetes.io/control-plane:NoSchedule]
140
-
[bootstrap-token] Using token: lsz2er.aq8iqirypexwftb5
0 commit comments