[*] 修改时区
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 44s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 44s
This commit is contained in:
71
k8s/README.md
Normal file
71
k8s/README.md
Normal file
@@ -0,0 +1,71 @@
|
||||
##
|
||||
```bash
|
||||
# 配置主机 host
|
||||
cat >> /etc/hosts <<EOF
|
||||
net.bridge.bridge-nf-call-ip6tables = 1
|
||||
net.bridge.bridge-nf-call-iptables = 1
|
||||
net.ipv4.ip_forward = 1
|
||||
EOF
|
||||
```
|
||||
|
||||
```bash
|
||||
cat <<EOF | sudo tee kubeadm-config.yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
bootstrapTokens:
|
||||
- groups:
|
||||
- system:bootstrappers:kubeadm:default-node-token
|
||||
token: b77tyr.n7bk46h0947nddkb
|
||||
ttl: 24h0m0s
|
||||
usages:
|
||||
- signing
|
||||
- authentication
|
||||
kind: InitConfiguration
|
||||
localAPIEndpoint:
|
||||
advertiseAddress: 10.1.2.200
|
||||
bindPort: 6443
|
||||
nodeRegistration:
|
||||
criSocket: unix:///var/run/containerd/containerd.sock
|
||||
imagePullPolicy: IfNotPresent
|
||||
imagePullSerial: true
|
||||
name: k8s-test
|
||||
taints:
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/control-plane
|
||||
timeouts:
|
||||
controlPlaneComponentHealthCheck: 4m0s
|
||||
discovery: 5m0s
|
||||
etcdAPICall: 2m0s
|
||||
kubeletHealthCheck: 4m0s
|
||||
kubernetesAPICall: 1m0s
|
||||
tlsBootstrap: 5m0s
|
||||
upgradeManifests: 5m0s
|
||||
---
|
||||
apiServer: {}
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
caCertificateValidityPeriod: 87600h0m0s
|
||||
certificateValidityPeriod: 8760h0m0s
|
||||
certificatesDir: /etc/kubernetes/pki
|
||||
clusterName: kubernetes
|
||||
controlPlaneEndpoint: $(hostname):6443
|
||||
controllerManager: {}
|
||||
dns:
|
||||
imageRepository: docker.martin98.com/k8s/coredns
|
||||
encryptionAlgorithm: RSA-2048
|
||||
etcd:
|
||||
local:
|
||||
dataDir: /var/lib/etcd
|
||||
imageRepository: docker.martin98.com/k8s
|
||||
kind: ClusterConfiguration
|
||||
kubernetesVersion: v1.32.1
|
||||
networking:
|
||||
dnsDomain: cluster.local
|
||||
podSubnet: 10.101.0.0/16
|
||||
serviceSubnet: 10.100.0.0/16
|
||||
proxy: {}
|
||||
scheduler: {}
|
||||
EOF
|
||||
|
||||
kubeadm init --config=kubeadm-config.yaml
|
||||
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user