mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-08 20:15:03 +10:00
update
This commit is contained in:
+1
-1
@@ -25,7 +25,6 @@ apiServer:
|
||||
timeoutForControlPlane: 4m0s
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
certificatesDir: /etc/kubernetes/pki
|
||||
clusterName: home-cluster
|
||||
controlPlaneEndpoint: 192.168.1.2:6443
|
||||
controllerManager: {}
|
||||
dns: {}
|
||||
@@ -37,6 +36,7 @@ etcd:
|
||||
- https://192.168.1.10:2379
|
||||
- https://192.168.1.11:2379
|
||||
- https://192.168.1.2:2379
|
||||
- https://192.168.1.6:2379
|
||||
keyFile: /etc/etcd/etcd-key.pem
|
||||
kind: ClusterConfiguration
|
||||
kubernetesVersion: v1.26.0
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ ExecStart=/usr/local/bin/etcd \\
|
||||
--listen-client-urls https://${INTERNAL_IP}:2379,https://127.0.0.1:2379 \\
|
||||
--advertise-client-urls https://${INTERNAL_IP}:2379 \\
|
||||
--initial-cluster-token etcd-cluster-0 \\
|
||||
--initial-cluster server-3=https://192.168.1.2:2380,ssd-server-1=https://192.168.1.111:2380,ssd-server-3=https://192.168.1.9:2380 \\
|
||||
--initial-cluster server-3=https://192.168.1.2:2380,ssd-server-2=https://192.168.1.10:2380,plex=https://192.168.1.11:2380,ssd-server-4=https://192.168.1.6:2380 \\
|
||||
--initial-cluster-state existing \\
|
||||
--data-dir=/var/lib/etcd
|
||||
Restart=on-failure
|
||||
|
||||
@@ -5,8 +5,13 @@ sudo ETCDCTL_API=3 etcdctl member list \
|
||||
--cert=/etc/etcd/etcd.pem \
|
||||
--key=/etc/etcd/etcd-key.pem
|
||||
|
||||
# member add
|
||||
# member add from an existing node
|
||||
sudo ETCDCTL_API=3 etcdctl member add server-3 --peer-urls=https://192.168.1.2:2380 --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/etcd.pem --key=/etc/etcd/etcd-key.pem
|
||||
|
||||
# get all keys
|
||||
sudo ETCDCTL_API=3 etcdctl get --prefix=true "" -w json --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/etcd.pem --key=/etc/etcd/etcd-key.pem
|
||||
|
||||
|
||||
# remove a member
|
||||
|
||||
sudo ETCDCTL_API=3 etcdctl member remove 3f3a73a30a4872c4 --endpoints=https://127.0.0.1:2379 --cacert=/etc/etcd/ca.pem --cert=/etc/etcd/etcd.pem --key=/etc/etcd/etcd-key.pem
|
||||
|
||||
+7
-4
@@ -3,12 +3,15 @@
|
||||
# Update HOST0, HOST1 and HOST2 with the IPs of your hosts
|
||||
export HOST0=192.168.1.2
|
||||
export HOST1=192.168.1.11
|
||||
export HOST2=192.168.1.111
|
||||
export HOST2=192.168.1.10
|
||||
export HOST2=192.168.1.6
|
||||
|
||||
# Update NAME0, NAME1 and NAME2 with the hostnames of your hosts
|
||||
export NAME0="server-1"
|
||||
export NAME0="server-3"
|
||||
export NAME1="plex"
|
||||
export NAME2="ssd-server-1"
|
||||
export NAME2="ssd-server-2"
|
||||
export NAME3="ssd-server-4"
|
||||
|
||||
|
||||
# Create temp directories to store files that will end up on other hosts.
|
||||
mkdir -p /tmp/${HOST0}/ /tmp/${HOST1}/ /tmp/${HOST2}/
|
||||
@@ -37,7 +40,7 @@ etcd:
|
||||
peerCertSANs:
|
||||
- "${HOST}"
|
||||
extraArgs:
|
||||
initial-cluster: ${NAMES[0]}=https://${HOSTS[0]}:2380,${NAMES[1]}=https://${HOSTS[1]}:2380,${NAMES[2]}=https://${HOSTS[2]}:2380
|
||||
initial-cluster: ${NAMES[0]}=https://${HOSTS[0]}:2380,${NAMES[1]}=https://${HOSTS[1]}:2380,${NAMES[2]}=https://${HOSTS[2]}:2380,${NAMES[3]}=https://${HOSTS[3]}:2380
|
||||
initial-cluster-state: new
|
||||
name: ${NAME}
|
||||
listen-peer-urls: https://${HOST}:2380
|
||||
|
||||
+10
@@ -165,3 +165,13 @@ https://computingforgeeks.com/install-cri-o-container-runtime-on-ubuntu-linux/
|
||||
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#cgroup-driver
|
||||
|
||||
# install kubeadm and kublet
|
||||
|
||||
# install some old version of a package
|
||||
|
||||
apt list --all-versions kubeadm
|
||||
|
||||
# then install
|
||||
|
||||
sudo apt install kubeadm=1.27.6-00
|
||||
|
||||
# Datadog crash probably related to redis, please make sure redis is healthy
|
||||
|
||||
Reference in New Issue
Block a user