Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable etcd for events only in large clusters #18819

Merged
merged 2 commits into from
Dec 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions cluster/saltbase/salt/etcd/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ touch /var/log/etcd-events.log:
server_port: 2380
cpulimit: '"200m"'

# Switch on second etcd instance if there are more than 50 nodes.
{% if pillar['num_nodes'] is defined and pillar['num_nodes'] > 50 -%}
/etc/kubernetes/manifests/etcd-events.manifest:
file.managed:
- source: salt://etcd/etcd.manifest
Expand All @@ -81,3 +83,4 @@ touch /var/log/etcd-events.log:
port: 4002
server_port: 2381
cpulimit: '"100m"'
{% endif -%}
6 changes: 5 additions & 1 deletion cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
{% endif -%}

{% set etcd_servers = "--etcd-servers=http://127.0.0.1:4001" -%}
{% set etcd_servers_overrides = "--etcd-servers-overrides=/events#http://127.0.0.1:4002" -%}
{% set etcd_servers_overrides = "" -%}
# If there are more than 50 nodes, there is a dedicated etcd instance for events.
{% if pillar['num_nodes'] is defined and pillar['num_nodes'] > 50 -%}
{% set etcd_servers_overrides = "--etcd-servers-overrides=/events#http://127.0.0.1:4002" -%}
{% endif -%}

{% set service_cluster_ip_range = "" -%}
{% if pillar['service_cluster_ip_range'] is defined -%}
Expand Down
10 changes: 10 additions & 0 deletions docs/admin/cluster-large.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ To avoid running into cloud provider quota issues, when creating a cluster with
* Target pools
* Gating the setup script so that it brings up new node VMs in smaller batches with waits in between, because some cloud providers rate limit the creation of VMs.

### Etcd storage

To improve performance of large clusters, we store events in a separate dedicated etcd instance.

When creating a cluster, existing salt scripts:
* start and configure additional etcd instance
* configure api-server to use it for storing events

However, this is done only for clusters having more than 50 nodes.

### Addon Resources

To prevent memory leaks or other resource issues in [cluster addons](../../cluster/addons/) from consuming all the resources available on a node, Kubernetes sets resource limits on addon containers to limit the CPU and Memory resources they can consume (See PR [#10653](http://pr.k8s.io/10653/files) and [#10778](http://pr.k8s.io/10778/files)).
Expand Down