Skip to content

Commit

Permalink
La doc part 09 à 11 et changements config workers
Browse files Browse the repository at this point in the history
  • Loading branch information
DrumSlayers committed Apr 14, 2023
1 parent ecd5f09 commit 304f8fa
Show file tree
Hide file tree
Showing 10 changed files with 466 additions and 22 deletions.
36 changes: 23 additions & 13 deletions 09-bootstrapping-kubernetes-workers/cni/net.d/10-bridge.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
"cniVersion": "0.4.0",
"name": "bridge",
"type": "bridge",
"bridge": "cnio0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"ranges": [
[{"subnet": "10.1.0.0/16"}]
],
"routes": [{"dst": "0.0.0.0/0"}]
}
"cniVersion": "1.0.0",
"name": "bridge",
"plugins": [
{
"type": "bridge",
"bridge": "cnio0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"ranges": [
[{"subnet": "10.200.0.0/24"}]
],
"routes": [{"dst": "0.0.0.0/0"}]
}
},
{
"type": "loopback"
}
]
}


8 changes: 4 additions & 4 deletions 09-bootstrapping-kubernetes-workers/containerd-config.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[plugins]
[plugins.cri.containerd]
snapshotter = "overlayfs"
[plugins.cri.containerd.default_runtime]
runtime_type = "io.containerd.runtime.v1.linux"
runtime_engine = "/usr/local/bin/runc"
runtime_root = ""
# [plugins.cri.containerd.default_runtime]
# runtime_type = "io.containerd.runtime.v1.linux"
# runtime_engine = "/usr/local/bin/runc"
# runtime_root = ""
[plugins.cri.containerd.runtimes.runc.options]
SystemdCgroup = true
[plugins.cri.containerd.runtimes.runc]
Expand Down
2 changes: 1 addition & 1 deletion 09-bootstrapping-kubernetes-workers/kube-proxy-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kubeproxy.config.k8s.io/v1alpha1
clientConnection:
kubeconfig: "/var/lib/kube-proxy/kubeconfig"
mode: "iptables"
clusterCIDR: "192.168.10.0/24"
clusterCIDR: "10.200.0.0/16"
EOF
6 changes: 2 additions & 4 deletions 09-bootstrapping-kubernetes-workers/kubelet-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cat <<EOF | sudo tee /var/lib/kubelet/kubelet-config.yaml
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
authentication:
Expand All @@ -13,9 +12,8 @@ authorization:
clusterDomain: "cluster.local"
clusterDNS:
- "10.32.0.10"
podCIDR: "10.1.0.0/24"
podCIDR: "10.200.0.0/24" #10.200.1.0/24 sur work2
resolvConf: "/run/systemd/resolve/resolv.conf"
runtimeRequestTimeout: "15m"
tlsCertFile: "/var/lib/kubelet/${HOSTNAME}.pem"
tlsPrivateKeyFile: "/var/lib/kubelet/${HOSTNAME}-key.pem"
EOF
tlsPrivateKeyFile: "/var/lib/kubelet/${HOSTNAME}-key.pem"
12 changes: 12 additions & 0 deletions 11-pod-network-routes/netplan-work1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
network:
ethernets:
ens33:
dhcp4: no
addresses: [192.168.10.29/24]
gateway4: 192.168.10.2
nameservers:
addresses: [1.1.1.1, 8.8.8.8]
routes:
- to: 10.200.1.0/24
via: 192.168.10.27
version: 2
12 changes: 12 additions & 0 deletions 11-pod-network-routes/netplan-work2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
network:
ethernets:
ens33:
dhcp4: no
addresses: [192.168.10.27/24]
gateway4: 192.168.10.2
nameservers:
addresses: [1.1.1.1, 8.8.8.8]
routes:
- to: 10.200.0.0/24
via: 192.168.10.29
version: 2
1 change: 1 addition & 0 deletions 11-pod-network-routes/routes-work1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ip route add 10.200.1.0/24 via 192.168.10.27
1 change: 1 addition & 0 deletions 11-pod-network-routes/routes-work2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ip route add 10.200.0.0/24 via 192.168.10.29
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# kube-the-hard-way
Everything in the title SIUUUUUUUUUUUUUU

# Documentation
[documentation.md](documentation.md)
Loading

0 comments on commit 304f8fa

Please sign in to comment.