Replies: 4 comments 15 replies
-
You certainly can run Clair distributed in kubernetes. The setup is discussed in broad strokes here. As that details, you'll need at least one database engine, a load balancer/router, and 3 deployments; the deployments should share the config, but each have the |
Beta Was this translation helpful? Give feedback.
-
There is also this manifest that we use for deploying Clair as a service (disclaimer: it's openshift specific so there's probably some k8s translation to do and there are some specific parts that might only be useful when operating at large-scale, i.e. the indexer volumes). |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestions @hdonnay and @crozzy Following the docker-compose.yaml file, I tried creating kubernetes configurations for all 3 modes and the load balancer. For example, below is the config.yaml for indexer:
Similarly I created 2 more config files for matcher and notifier resp and a load balancer. Kindly find them below:
I can see that all 3 pods are running and the matcher logs show that it is filling the vulnerabilities in it’s database. However, notifier logs sometimes show that it is failing to lookup for clair-matcher. Next, I tried creating another pod with a container that runs traefik as a load balancer. Below is the configuration:
But the traefik logs show as below:
It seems traefik is looking for database, but my understanding is that traefik will only load balance all 3 modes of clair, and it does not require database. I even tried creating a database container in traefik pod, but it didn’t help. May I know is this the correct configuration that I use? If not, can you please suggest me what else can be changed to load balance all 3 modes of clair? FYI, I am running clair on minikube. |
Beta Was this translation helpful? Give feedback.
-
Hi Team! I am new at Clair, but try to dive deeper =) show configuration
My deploy in cluster look like I get 404 when I try to curl 8080. What's wrong? clair-index terminal
As I see in documentation, clair services works on 6060 https://quay.github.io/clair/howto/testing.html#starting-a-cluster |
Beta Was this translation helpful? Give feedback.
-
Hi Team,
I am working with Clair using the latest v4.4.4.
I successfully ran the Combo and Distributive modes of Clair using docker-compose.yaml.
Now, I am working on running the distributive mode on the k8s cluster. For this, I will be using minikube.
I found this old commit here, and it seems that the helm method of deployment has been removed from the source code and the documentation.
Also, I could not find any config in the source code that can be used to deploy Clair on k8s.
May I know, do you support running Clair with k8s? And if yes, can you please point me to the official Clair’s documentation for the same?
Beta Was this translation helpful? Give feedback.
All reactions