Merge pull request #969 from mattymo/port_reserve
Prevent dynamic port allocation in nodePort rangepull/990/head
commit
491074aab1
|
@ -29,3 +29,7 @@ nginx_image_repo: nginx
|
|||
nginx_image_tag: 1.11.4-alpine
|
||||
|
||||
etcd_config_dir: /etc/ssl/etcd
|
||||
|
||||
# A port range to reserve for services with NodePort visibility.
|
||||
# Inclusive at both ends of the range.
|
||||
kube_apiserver_node_port_range: "30000-32767"
|
||||
|
|
|
@ -21,6 +21,16 @@
|
|||
notify: restart kubelet
|
||||
tags: kubelet
|
||||
|
||||
- name: Ensure nodePort range is reserved
|
||||
sysctl:
|
||||
name: net.ipv4.ip_local_reserved_ports
|
||||
value: "{{ kube_apiserver_node_port_range }}"
|
||||
sysctl_set: yes
|
||||
state: present
|
||||
reload: yes
|
||||
when: kube_apiserver_node_port_range is defined
|
||||
tags: kube-proxy
|
||||
|
||||
- name: Write proxy manifest
|
||||
template:
|
||||
src: manifests/kube-proxy.manifest.j2
|
||||
|
|
Loading…
Reference in New Issue