Deploy Snyk
You can scan Kubernetes workloads by deploying the snyk-monitor into your cluster. This is published as an official helm chart and we will be basing these steps on that deployment option. To learn more about Snyk's Kubernetes integration, visit our documentation pages. For convenience, we will cover the steps at a high level here.

Step 1

Create the namespace:
1
kubectl create namespace snyk-monitor
Copied!

Step 2

Create the secret:
1
kubectl create secret generic snyk-monitor -n snyk-monitor --from-literal=dockercfg.json={} --from-literal=integrationId=abcd1234-abcd-1234-abcd-1234abcd1234
Copied!
Locate your Integration ID from the Snyk Integrations page and copy it.

Step 3

Add the Helm repo:
1
helm repo add snyk-charts https://snyk.github.io/kubernetes-monitor/ --force-update
Copied!

Step 4

Replace "my-cluster" with the name of your cluster. Also note that we are passing a few settings for compatibility with GKE Autopilot.
Install the chart:
1
helm upgrade --install snyk-monitor snyk-charts/snyk-monitor \
2
--namespace snyk-monitor \
3
--set pvc.enabled=true \
4
--set pvc.create=true \
5
--set pvc.name="snyk-monitor-pvc" \
6
--set clusterName="my-cluster" \
7
--set nodeAffinity.disableBetaArchNodeSelector=true \
8
--set requests.memory="512Mi" \
9
--set requests."ephemeral-storage"="50Gi" \
10
--set limits."ephemeral-storage"="50Gi"
Copied!
Now, we wait for the app to be ready and can check the status by running the following command:
1
kubectl get pods -n snyk-monitor
Copied!
Like the previous example, we want a ready status to be displayed.
Export as PDF
Copy link
Edit on GitHub
Contents