Kubernetes Security Best Practices That You Must Know
Tags: kubernetes, software, apps
Published: 2020-08-03 14:43:04

Kubernetes is an open-source system for automating deployment, scaling  and management of containerized applications. But these new deployments can cause attacks and exploits from attackers and insiders as traditional environments which makes kubernetes security a prime concern for all deployments. 

Nearly, 94% of organizations have encountered a genuine security issue within a year in their container environment, 69% having detected misconfigurations, 27% experienced runtime security issues and also 24% found significant vulnerabilities to remediate. Each of these issues relates to a container lifecycle phase. You can differentiate these vulnerabilities during build/deploy phase, runtime phase etc.

# Kubernetes Vulnerabilities And Attack Vectors-
Attacks on Kubernetes containers running in pods can come internally by insiders or externally through the network, that includes victims of phishing attacks whose system becomes a mediator for insider attacks. Some of the examples are as follows-

**1. Unauthorized connections between pods-** Compromised containers can try to connect with running pods to attack. Layer 3 network controls whitelisting pod IP addresses can offer protection but attacks over trusted IP addresses can only be detected with Layer 7 network filtering.

**2. Container compromise-** Application misconfiguration or vulnerability empowers the attacker to get into a container to start probing for weaknesses in the network, process controls or file system. 

**3. Data exfiltration from a pod-** Data stealing is generally carried out by combination of techniques, which can include a reverse shell in a pod connecting to a command/control server and network tunneling to hide confidential information.

# Kubernetes Security Best Practices: Infrastructure Security-

**Kubernetes Security Best Practices**
*1. Update your Kubernetes-*
Only the last three versions of Kubernetes are supported, including security patches for new vulnerabilities. Hence if severe vulnerability is discovered, and you are four versions behind, then your version will not receive a patch.   

*2. Securely configure the Kubernetes API server-*
Ensure that you’re disabling unauthenticated/anonymous access and using TLS encryption for connections between the kubelets and the API server. 

**Kubernetes Security Best Practices: Build Phase-**
Securing containers and Kubernetes begins in the build phase with securing your container images. Any missed security best practices will be essentially more costly to fix down the line – consequently the expression “shift left” which means implementing security at prior stages as images are built. Scan and secure images are the main things to secure from any known vulnerabilities.

*Recommendations-*
*1. Use an image scanner-*
Image scanner can identify vulnerabilities in your images, including by layer and tell you whether they are fixable or not. It must scan for vulnerabilities in OS packages and also third-party runtime libraries for the languages being utilized in your containerized applications.


Know more at- [https://solaceinfotech.com/blog/kubernetes-security-best-practices-that-you-must-know/]