Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

Commit

Permalink
fix flaky cluster by letting etcd persist. Add kubernetes service ip …
Browse files Browse the repository at this point in the history
…as a SAN. Let kubelet restart. Add set-kubeconfig helper for configuring kubeconfig after deployment. Add note about extra-sans-ip being unused.
  • Loading branch information
colemickens committed Jun 14, 2016
1 parent 48df5cf commit f56f5e2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
4 changes: 4 additions & 0 deletions min-turnup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ menuconfig: .tmp/mconf
echo-config: .config.json
cat $<

set-kubeconfig:
kubectl config set-cluster $(CLUSTER_NAME) --server https://$(MASTER_IP):443 --certificate-authority=phase1b/crypto/ca.pem --embed-certs=true
kubectl config set-credentials $(CLUSTER_NAME) --server https://$(MASTER_IP):443 --client-certificate=./phase1b/crypto/kubelet.pem --client-key=./phase1b/crypto/kubelet-key.pem --embed-certs=true
kubectl config set-context $(CLUSTER_NAME) --cluster $(CLUSTER_NAME) --user $(CLUSTER_NAME)

clean:
rm -rf .tmp
Expand Down
1 change: 1 addition & 0 deletions min-turnup/README-azure
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Other things:

1. This copies root ca private key to the nodes which is not needed

2. I don't see `config.phase2.extra-api-sans` being used anywhere...
5 changes: 3 additions & 2 deletions min-turnup/phase1/azure/lib/azure.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function(cfg1)
resource_group: "%(instance_prefix)s" % cfg,
master_public_ip: "%(instance_prefix)s-master-pip" % cfg,
availability_set: "%(instance_prefix)s-as" % cfg,
storage_account: "%(instance_prefix)sstrg" % cfg,
storage_account: "${replace(\"%(instance_prefix)sstrg\", \"-\", \"\")}" % cfg,
storage_container: "kube0000%(instance_prefix)s" % cfg,
vnet: "%(instance_prefix)s-vnet" % cfg,
subnet: "%(instance_prefix)s-subnet" % cfg,
Expand Down Expand Up @@ -137,7 +137,8 @@ function(cfg1)
DNS.4 = kubernetes.default.svc.cluster.local
DNS.5 = names.master_vm
IP.1 = ${azurerm_public_ip.pip.ip_address}
IP.2 = %s
IP.2 = 10.3.0.1
IP.3 = %s
EOF
||| % master_private_ip
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"/usr/local/bin/etcd",
"--listen-peer-urls=http://127.0.0.1:2380",
"--addr=127.0.0.1:2379",
"--bind-addr=127.0.0.1:2379"
"--bind-addr=127.0.0.1:2379",
"--data-dir=/var/lib/etcd/data"
],
"livenessProbe": {
"httpGet": {
Expand All @@ -42,8 +43,22 @@
"containerPort": 2379,
"hostPort": 2379
}
],
"volumeMounts": [
{
"name": "varetcd",
"mountPath": "/var/lib/etcd"
}
]
}
],
"volumes": [
{
"name": "varetcd",
"hostPath": {
"path": "/var/lib/etcd"
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ExecStart=/usr/bin/docker run \
--cluster-dns=10.3.0.10 \
--cluster-domain=cluster.local \
--v=9
#Restart=always
#KillMode=process
Restart=always
KillMode=process

[Install]
WantedBy=multi-user.target

0 comments on commit f56f5e2

Please sign in to comment.