mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
Switch to etcd 2
This commit is contained in:
parent
d2284fee88
commit
35452538f4
@ -14,13 +14,12 @@ write_files:
|
||||
RuntimeMaxUse=50M
|
||||
|
||||
coreos:
|
||||
etcd:
|
||||
name: ${name}
|
||||
addr: ${public_ip}:4001
|
||||
bind-addr: 0.0.0.0
|
||||
peer-addr: ${public_ip}:7001
|
||||
# peers: {etcd_peers}
|
||||
etcd2:
|
||||
discovery: ${discovery}
|
||||
advertise-client-urls: http://${public_ip}:2379
|
||||
initial-advertise-peer-urls: http://${public_ip}:2380
|
||||
listen-client-urls: http://0.0.0.0:2379
|
||||
listen-peer-urls: http://${public_ip}:2380
|
||||
units:
|
||||
- name: static.network
|
||||
command: start
|
||||
@ -69,7 +68,7 @@ coreos:
|
||||
ExecStart=/usr/sbin/iptables -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE ! -d ${CONTAINER_SUBNET}
|
||||
RemainAfterExit=yes
|
||||
Type=oneshot
|
||||
- name: etcd.service
|
||||
- name: etcd2.service
|
||||
command: start
|
||||
- name: docker.service
|
||||
command: start
|
||||
|
@ -6,17 +6,17 @@ coreos:
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
After=opt-kubernetes.mount etcd.service
|
||||
After=opt-kubernetes.mount etcd2.service
|
||||
ConditionFileIsExecutable=/opt/kubernetes/bin/kube-apiserver
|
||||
Description=Kubernetes API Server
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Requires=opt-kubernetes.mount etcd.service
|
||||
Requires=opt-kubernetes.mount etcd2.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/bin/kube-apiserver \
|
||||
--address=0.0.0.0 \
|
||||
--port=8080 \
|
||||
--etcd-servers=http://127.0.0.1:4001 \
|
||||
--etcd-servers=http://127.0.0.1:2379 \
|
||||
--kubelet-port=10250 \
|
||||
--service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}
|
||||
Restart=always
|
||||
|
@ -6,11 +6,11 @@ coreos:
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
After=opt-kubernetes.mount etcd.service docker.socket
|
||||
After=opt-kubernetes.mount docker.socket
|
||||
ConditionFileIsExecutable=/opt/kubernetes/bin/kubelet
|
||||
Description=Kubernetes Kubelet
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Requires=opt-kubernetes.mount etcd.service docker.socket
|
||||
Requires=opt-kubernetes.mount docker.socket
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/bin/kubelet \
|
||||
@ -29,11 +29,11 @@ coreos:
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
After=opt-kubernetes.mount etcd.service
|
||||
After=opt-kubernetes.mount
|
||||
ConditionFileIsExecutable=/opt/kubernetes/bin/kube-proxy
|
||||
Description=Kubernetes Proxy
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Requires=opt-kubernetes.mount etcd.service
|
||||
Requires=opt-kubernetes.mount
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/kubernetes/bin/kube-proxy \
|
||||
|
@ -183,12 +183,13 @@ function wait-cluster-readiness {
|
||||
function kube-up {
|
||||
detect-master
|
||||
detect-minions
|
||||
get-kubeconfig-bearertoken
|
||||
initialize-pool keep_base_image
|
||||
initialize-network
|
||||
|
||||
readonly ssh_keys="$(cat ~/.ssh/id_*.pub | sed 's/^/ - /')"
|
||||
readonly kubernetes_dir="$POOL_PATH/kubernetes"
|
||||
readonly discovery=$(curl -s https://discovery.etcd.io/new)
|
||||
readonly discovery=$(curl -s https://discovery.etcd.io/new?size=$(($NUM_MINIONS+1)))
|
||||
|
||||
readonly machines=$(join , "${KUBE_MINION_IP_ADDRESSES[@]}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user