# K8Guard

Published articles for K8Guard.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## K8Guard

DevFeed: [K8Guard](<https://devfeed.tech/articles/k8guard-20409.md>)

Original publisher: [Read original article](<https://target.github.io/infrastructure/k8guard-the-guardian-angel-for-kuberentes>)

Author: Target Brands, Inc

Published: 2017-06-27T05:00:00Z

Content type: release

Language: en

Sources: [Target](<https://devfeed.tech/sources/target.md>)

Topics: [K8Guard](<https://devfeed.tech/topics/k8guard.md>), [Prometheus](<https://devfeed.tech/topics/prometheus.md>), [Apache Kafka](<https://devfeed.tech/topics/apache-kafka.md>), [Grafana](<https://devfeed.tech/topics/grafana.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [audit](<https://devfeed.tech/tags/audit.md>), [automation](<https://devfeed.tech/tags/automation.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [clusters](<https://devfeed.tech/tags/clusters.md>), [container](<https://devfeed.tech/tags/container.md>), [dashboards](<https://devfeed.tech/tags/dashboards.md>), [deployments](<https://devfeed.tech/tags/deployments.md>), [docker](<https://devfeed.tech/tags/docker.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [email](<https://devfeed.tech/tags/email.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [ingress](<https://devfeed.tech/tags/ingress.md>), [jobs](<https://devfeed.tech/tags/jobs.md>), [k8guard](<https://devfeed.tech/tags/k8guard.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [monitors](<https://devfeed.tech/tags/monitors.md>), [namespaces](<https://devfeed.tech/tags/namespaces.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [platform](<https://devfeed.tech/tags/platform.md>), [pods](<https://devfeed.tech/tags/pods.md>), [prometheus](<https://devfeed.tech/tags/prometheus.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

K8Guard is an open-source Kubernetes auditing system that checks resources such as deployments, pods, jobs, ingresses, and namespaces for violations involving security, efficiency, availability, or stability. It notifies namespace owners and, after a configurable number of notices, can scale deployments to zero, suspend jobs, or delete ingresses; safe mode limits it to notifications. Its discover service can publish violations to Kafka or serve them through an API without Kafka. The action service processes Kafka messages and records actions in Cassandra, while the report service provides searchable records of past actions. The excerpt also describes 19 discover API metrics, including resource and violation counts, plus API-call timing measurements for Prometheus and Grafana dashboards.

### Source excerpt

K8Guard is Officially Open Source I am happy to announce that Target has open sourced K8Guard. I have been part of designing and developing it for the past few months, and I'm going to share a little more about it. What is K8Guard? K8Guard is an auditing system for Kubernetes clusters. It monitors different entities on your cluster for possible violations. K8Guard notifies the violators and then takes action on them. It also provides metrics and dashboards about violations in the cluster through Prometheus. How to Pronounce It? Like Kate Guard - the guardian angel for your Kubernetes clusters. Why? If you have large size kuberentes clusters and you care about security, efficiency, availability and stability, you need a tool to detect violations and do appropriate actions on them. What Kind of Violations Does It Discover? Violation Why Example Image Size Efficiency 5 GB image size Image Repo Security Downloading image from a shady repo Extra Capabilities Security Setting UID/GUID Privileged Mode Security Root containers Single Replica Availability Not 12-factor app Invalid Ingress Security/Stability Having *" in ingress Mount Host Vols Security/Stability Mounting Kubernetes system files No Owner Security No owner annotation for namespace What Kind of Entities Does It Monitor? Any entities which deployed to your kubernetes cluster such as Deployments, Pods, Jobs/CronJobs, Ingresses and namespaces. What Kind of Actions Does It Take? Notifies the namespace owner (email, hipchat, ...). After X amount of notifications, it will do a hard action such as: Scale bad deployments down to zero. Suspend bad jobs. Delete bad ingress Note that there is a safe mode - which only notifies and does not do hard actions. The K8Guard Design K8Guard has 3 main microservices (discover, action, report) Discover service, when in messaging mode, finds violations and puts them on a kafka topic. and also discover API mode, is able to serve without depending on kafka. you can hit the end points to