The Internet of Things (IoT) has ushered in an era of connected devices that, while facilitating real-time data collection and sharing, also exposes these devices to significant security risks. This study addresses the challenges of security risks and vulnerabilities by employing the Network Policy in Kubernetes and focusing on the SARIK framework. SARIK is designed to automate the creation and implementation of network policies, with the aim of enhancing the efficiency and strengthening the protection of IoT devices. Experiments conducted in a controlled environment with Minikube in Kubernetes showed that the implementation of SARIK notably improved the security of IoT devices. Key observations included a noticeable reduction in vulnerability to cyberattacks and a significant increase in the overall resilience of the system. In particular, the study revealed improvements in the performance metrics analyzed, which is evidence of SARIK’s effectiveness in real-world scenarios. Compared with existing frameworks - e.g., those of Sysdig -, SARIK is notable for its integration with Kubernetes network policies and its emphasis on automated security management. Although automation is a key factor in related works, SARIK’s unique approach to leveraging the inherent capabilities of Kubernetes offers a distinct advantage in ensuring the security of IoT environments. This aspect, along with its performance benefits, underlines the value of SARIK’s contribution to IoT security. The application of SARIK in protecting IoT devices in Kubernetes environments meets the need for automated and cohesive strategies to tackle current security threats. This study not only highlights the efficiency of SARIK but also emphasizes the need for evolving security strategies, that can be adapted to dynamic threat modeling in complex and interconnected IT environments.