Skip to content

Commit 05085a5

Browse files
rothgarIheanacho-ai
authored andcommitted
feat: add wiz connector deployment guide
Wiz docs show talos 1.8.3+ is supported. Signed-off-by: Amarachi Iheanacho <amarachi.iheanacho@siderolabs.com>
1 parent c245098 commit 05085a5

3 files changed

Lines changed: 173 additions & 1 deletion

File tree

kubernetes-guides.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ navigation:
3131
- "pod-security.mdx"
3232
- "seccomp-profiles.mdx"
3333
- "usernamespace.mdx"
34+
- "wiz-kubernetes-connector.mdx"
3435

3536
- group: "Monitoring & Observability"
3637
folder: "kubernetes-guides/monitoring-and-observability"

public/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,8 @@
27772777
"pages": [
27782778
"kubernetes-guides/security/pod-security",
27792779
"kubernetes-guides/security/seccomp-profiles",
2780-
"kubernetes-guides/security/usernamespace"
2780+
"kubernetes-guides/security/usernamespace",
2781+
"kubernetes-guides/security/wiz-kubernetes-connector"
27812782
]
27822783
},
27832784
{
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
title: "Install the Wiz Kubernetes Connector"
3+
description: "In this guide you will learn how to install the Wiz Kubernetes Connector on Talos using Helm."
4+
---
5+
6+
import { k8s_release } from '/snippets/custom-variables.mdx';
7+
8+
The [Wiz Kubernetes Connector](https://docs.wiz.io/wiz-docs/docs/kubernetes-connector) provides security visibility into your Kubernetes clusters by scanning for vulnerabilities, misconfigurations, and compliance issues.
9+
10+
This guide covers how to install the connector on Talos Linux.
11+
12+
## Prerequisites
13+
14+
Before you begin, ensure you have the following:
15+
16+
- Talos 1.83 or later
17+
- A Wiz account with access to the Wiz portal.
18+
- A Wiz Service Account with **Kubernetes Connector** permissions. You can create one in the Wiz portal under **Settings > Service Accounts**.
19+
- `helm` installed on your local machine.
20+
- `kubectl` configured to access your Talos cluster.
21+
22+
## Set up the Wiz Kubernetes connector credentials
23+
24+
To install the Wiz Kubernetes Connector, you need to set your Wiz credentials as shell variables and create a Helm values file that references them.
25+
26+
**Step 1.** Export your Wiz credentials as shell variables, replacing each placeholder with the corresponding value from Wiz:
27+
28+
```bash
29+
export CLUSTER_NAME="<cluster-name>" # e.g. my-cluster
30+
export WIZ_API_ENDPOINT="<wiz-api-endpoint>" # e.g. https://api.us1.app.wiz.io/graphql
31+
export WIZ_CLIENT_ID="<wiz-client-id>" # e.g. sa-1a2b3c4d-5e6f
32+
export WIZ_CLIENT_SECRET="<wiz-client-secret>" # e.g. eyJhbGciOiJSUzI1NiIsInR5cCI
33+
```
34+
35+
**Step 2.** Create a Helm values file named `wiz-values.yaml` by running the following command. This file configures authentication with the Wiz API and specifies the cluster to register:
36+
37+
```bash
38+
cat <<EOF > wiz-values.yaml
39+
global:
40+
wizApiToken:
41+
secret:
42+
name: wiz-api-credentials
43+
clientIdKey: clientId
44+
clientTokenKey: clientToken
45+
clusterExternalId: ${CLUSTER_NAME}
46+
wizConnector:
47+
apiEndpoint: ${WIZ_API_ENDPOINT}
48+
EOF
49+
```
50+
51+
With your credentials set and your values file in place, you are ready to install the connector.
52+
53+
## Install the Wiz Kubernetes connector
54+
55+
You can install the Wiz Kubernetes Connector in one of the following ways:
56+
57+
- **Using Omni manifest sync**: Recommended if you manage clusters with [Omni](https://www.siderolabs.com/omni-for-kubernetes-cluster-management). This approach renders the Helm chart to static manifests that Omni applies automatically after the cluster becomes available.
58+
- **Using Helm**: Recommended if you manage your clusters directly without Omni.
59+
60+
### Using Omni manifest sync
61+
62+
With [Omni manifest sync](../../omni/cluster-management/sync-kubernetes-manifests), you manage the Wiz connector declaratively as part of your cluster configuration. First render the Helm chart to static manifests, then reference those manifests in your cluster template.
63+
64+
**Step 1.** Render the Helm chart to a manifest file:
65+
66+
```bash
67+
helm repo add wiz https://charts.wiz.io
68+
helm repo update
69+
helm template wiz-kubernetes-connector wiz/wiz-kubernetes-connector \
70+
--namespace wiz \
71+
--values wiz-values.yaml > wiz-connector.yaml
72+
```
73+
74+
**Step 2.** Create a `wiz-prereqs.yaml` file with the namespace and secret:
75+
76+
```bash
77+
cat <<EOF > wiz-prereqs.yaml
78+
apiVersion: v1
79+
kind: Namespace
80+
metadata:
81+
name: wiz
82+
---
83+
apiVersion: v1
84+
kind: Secret
85+
metadata:
86+
name: wiz-api-credentials
87+
namespace: wiz
88+
type: Opaque
89+
stringData:
90+
clientId: ${WIZ_CLIENT_ID}
91+
clientToken: ${WIZ_CLIENT_SECRET}
92+
EOF
93+
```
94+
95+
**Step 3.** Reference both manifests in your Omni cluster template:
96+
97+
<CodeBlock lang="yaml">
98+
{`kind: Cluster\nname: my-cluster\nkubernetes:\n version: ${k8s_release}\n manifests:\n - name: wiz-prereqs\n file: wiz-prereqs.yaml\n mode: full\n - name: wiz-connector\n file: wiz-connector.yaml\n mode: full\n...\n# Include machines for template`}
99+
</CodeBlock>
100+
101+
**Step 4.** Apply the cluster template:
102+
103+
```bash
104+
omnictl cluster template sync --file cluster-template.yaml
105+
```
106+
107+
**Step 5.** Verify that the connector pods are running:
108+
109+
```bash
110+
kubectl get pods -n wiz
111+
```
112+
113+
The connector pods should appear in the `Running` state. After startup, the connector registers with the Wiz portal and begins scanning the cluster. You can verify the connection in the Wiz portal under **Settings > Connectors**.
114+
115+
### Using Helm
116+
117+
If you are not using Omni, you can install the connector directly with Helm.
118+
119+
**Step 1.** Add the Wiz Helm repository:
120+
121+
```bash
122+
helm repo add wiz https://charts.wiz.io
123+
helm repo update
124+
```
125+
126+
**Step 2.** Create a dedicated namespace for the Wiz connector:
127+
128+
```bash
129+
kubectl create namespace wiz
130+
```
131+
132+
**Step 3.** Create the API credentials secret using your Wiz Client ID and Client Secret:
133+
134+
```bash
135+
kubectl create secret generic wiz-api-credentials \
136+
--namespace wiz \
137+
--from-literal=clientId="${WIZ_CLIENT_ID}" \
138+
--from-literal=clientToken="${WIZ_CLIENT_SECRET}"
139+
```
140+
141+
**Step 4.** Install the connector:
142+
143+
```bash
144+
helm install wiz-kubernetes-connector wiz/wiz-kubernetes-connector \
145+
--namespace wiz \
146+
--values wiz-values.yaml
147+
```
148+
149+
**Step 5.** Verify that the connector pods are running:
150+
151+
```bash
152+
kubectl get pods -n wiz
153+
```
154+
155+
You should see the connector pods in a `Running` state. The connector will register with the Wiz portal and begin scanning your cluster. You can confirm the connection in the Wiz portal under **Settings > Connectors**.
156+
157+
## Uninstall the Wiz Kubernetes connector
158+
159+
To remove the connector when installed via Helm:
160+
161+
```bash
162+
helm uninstall wiz-kubernetes-connector --namespace wiz
163+
kubectl delete namespace wiz
164+
```
165+
166+
When installed via Omni, remove the manifest entries from your cluster template and re-sync:
167+
168+
```bash
169+
omnictl cluster template sync --file cluster-template.yaml
170+
```

0 commit comments

Comments
 (0)