Kubernetes Network Policies for Isolating Namespaces
Kubernetes Network Policies for Isolating Namespaces aBaQV
Kubernetes is hailed as a modern-day operating system for cloud-native applications. It simplifies application deployment and management for applications running in the cloud. However, when running applications deployed in production, security cannot be overlooked.
Kubernetes does provide some defaults, but those shouldn’t be relied on when you have mission-critical applications running inside a multi-tenant cluster. The following are some of the highlighted security risks that you should handle properly before moving to production:
Who can make changes to my cluster?
What if we use the default namespace for all the different applications?
What about container image vulnerabilities?
How about securing sensitive data like credentials, keys, etc. ?
Should we restrict or allow all the pods to communicate with each other?
You should be aware that Kubernetes is not secure by default but provides ways and means to handle these security risks. For example, using RBAC, you can enable only an authorized person to make changes to your cluster.
Using namespaces, you can achieve resource and environment segregation among different teams or applications. Using namespaces and RBAC, you can limit the impact of a disaster.
For example, if someone fired a command by mistake, then the impact is limited to that namespace. We can reduce container image vulnerabilities by using a secure base image and regular scanning. Using secrets, you can secure sensitive data. By default, pods can communicate with each other irrespective of their namespace. But with Kubernetes network policies, you can control that, and policies here behave like firewall rules between your pods.
Kubernetes
is hailed
as a modern-day operating system for cloud-native
applications
. It simplifies
application
deployment and management for
applications
running in the cloud.
However
, when running
applications
deployed in production, security cannot
be overlooked
.
Kubernetes does provide
some
defaults
,
but
those shouldn’t
be relied
on when you have mission-critical
applications
running inside a multi-tenant cluster. The following are
some of the
highlighted security
risks
that you should handle
properly
before
moving to production:
Who can
make
changes
to my cluster?
What if we
use
the
default
namespace for all the
different
applications?
What about container image vulnerabilities?
How about securing sensitive data like credentials, keys, etc. ?
Should we restrict or
allow
all the pods to communicate with each other?
You should be aware that Kubernetes is not secure by
default
but
provides ways and means to handle these security
risks
.
For example
, using
RBAC
, you can enable
only
an authorized person to
make
changes
to your cluster.
Using namespaces, you can achieve resource and environment segregation among
different
teams or
applications
. Using namespaces and
RBAC
, you can limit the impact of a disaster.
For example
, if someone fired a command by mistake, then the impact
is limited
to that namespace. We can
reduce
container image vulnerabilities by using a secure base image and regular scanning. Using secrets, you can secure sensitive data. By
default
, pods can communicate with each other irrespective of their namespace.
But
with Kubernetes network policies, you can control that, and policies here behave like firewall
rules
between your pods.
Do not write below this line