Skip to content

Commit 0b5974e

Browse files
author
carmat88
committed
Adding advanced topic doc - ingress port opening
1 parent be998bf commit 0b5974e

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Ingress Port Opening
2+
====================
3+
On some deployments you might need to manually configure ports in order to allow specific service traffic. This can be done by adding/modifying the field ``ports_ingress_tcp`` in the configuration file ``config.tfvars`` (which you should be familiar with by now). Default is equals to ``["22", "80", "443"]``. Let's suppose your newly deployed service required ports ``7443`` and ``9443`` to be opened, then one would modify the ``config.tfvars`` as follows::
4+
5+
# Cluster configuration
6+
provider = "openstack" # Cloud provider for this config
7+
cluster_prefix = "whatever" # Your cluster prefix
8+
kubeadm_token = "Aut0G3n3R8t3D" # Autogenerated kubeadm token
9+
floating_ip_pool = "default"
10+
external_network_uuid = "123a-456b-789c-..." # The uuid of the external network in the OpenStack tenancy
11+
ports_ingress_tcp = ["7443", "9443"]
12+
boot_image = "kubenow-v060b1"
13+
14+
# Master configuration
15+
master_flavor = "medium"
16+
master_as_edge = "true"
17+
18+
# Node configuration
19+
node_count = "3"
20+
node_flavor = "medium"
21+
....
22+
23+
So we've modified the field ``ports_ingress_tcp`` so to read **ports_ingress_tcp = [7443", "9443"]**.
24+
25+
To Keep in Mind
26+
~~~~~~~~~~~~~~~
27+
It is important to consider potential security risks to avoid future issues. While opening ports does put you more at risk than having none open, you are only in danger if an attack can exploit the service that is using that port. A port is not an all access pass to a cluster/network if an attacker happens upon it. Security is a complex topic indeed and can vary from case to case. Nevertheless here are some best practices for porper configuration:
28+
29+
- **Block by default**: block all traffic by default and explicitly allow only specific traffic to known services. This strategy provides good control over the traffic and reduces the possibility of a breach because of service misconfiguration.
30+
31+
- **Allow specific traffic**:in general the rules that you use to define network access should be as specific as possible. This strategy is referred to as *the principle of least privilege*, and it forces control over network traffic. In this case what you are specifying is a certain port (or list of them) for your services to be reachable from outside the cluster's network.

index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Welcome to KubeNow's documentation! This is a place where we aim to help you to
3232
advanced_topics/alternative-image
3333
advanced_topics/scale
3434
advanced_topics/provision
35+
advanced_topics/ingress-port-opening
3536

3637
.. toctree::
3738
:maxdepth: 2

0 commit comments

Comments
 (0)