Skip to content

Commit 1147c4a

Browse files
feat: updating konnector agent doc
1 parent 073f350 commit 1147c4a

9 files changed

+272
-82
lines changed

docs/content/addons/k8s-registration-agent.md

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
+++
2+
title = "Konnector Agent Addon"
3+
icon = "fa-solid fa-plug"
4+
+++
5+
6+
The Konnector Agent addon enables automatic registration of Kubernetes clusters with Nutanix Prism Central. This addon leverages Cluster API lifecycle hooks to deploy the [Konnector Agent](https://github.com/nutanix-core/k8s-agent) on the new clusters.
7+
8+
## Overview
9+
10+
The Konnector Agent addon provides:
11+
- **Automatic cluster registration** with Nutanix Prism Central
12+
- **Lifecycle management** through Cluster API hooks
13+
- **Credential management** for secure Prism Central connectivity
14+
15+
## Lifecycle Hooks
16+
17+
The addon implements the following Cluster API lifecycle hooks:
18+
19+
### AfterControlPlaneInitialized
20+
- **Purpose**: Deploys the Konnector Agent after the control plane is ready
21+
- **Timing**: Executes when the cluster control plane is fully initialized
22+
- **Actions**:
23+
- Creates credentials secret on the target cluster
24+
- Deploys the Konnector Agent using the specified strategy
25+
- Configures Prism Central connectivity
26+
27+
### BeforeClusterUpgrade
28+
- **Purpose**: Ensures the agent is properly configured before cluster upgrades
29+
- **Timing**: Executes before cluster upgrade operations
30+
- **Actions**: Re-applies the agent configuration if needed
31+
32+
### BeforeClusterDelete
33+
- **Purpose**: Gracefully removes the Konnector Agent before cluster deletion
34+
- **Timing**: Executes before cluster deletion begins
35+
- **Actions**:
36+
- Initiates graceful helm uninstall
37+
- Waits for cleanup completion
38+
- Ensures proper cleanup order
39+
40+
## Configuration
41+
42+
### Basic Configuration
43+
44+
```yaml
45+
apiVersion: cluster.x-k8s.io/v1beta1
46+
kind: Cluster
47+
metadata:
48+
name: my-cluster
49+
spec:
50+
topology:
51+
variables:
52+
- name: clusterConfig
53+
value:
54+
addons:
55+
konnectorAgent: {}
56+
```
57+
58+
### Advanced Configuration
59+
60+
```yaml
61+
apiVersion: cluster.x-k8s.io/v1beta1
62+
kind: Cluster
63+
metadata:
64+
name: my-cluster
65+
spec:
66+
topology:
67+
variables:
68+
- name: clusterConfig
69+
value:
70+
addons:
71+
konnectorAgent:
72+
strategy: HelmAddon
73+
credentials:
74+
secretRef:
75+
name: prism-central-credentials-for-konnector-agent
76+
```
77+
78+
## Configuration Reference
79+
80+
### NutanixKonnectorAgent
81+
82+
| Field | Type | Required | Default | Description |
83+
|-------|------|----------|---------|-------------|
84+
| `strategy` | string | No | `HelmAddon` | Deployment strategy (`HelmAddon`) |
85+
| `credentials` | object | No | - | Prism Central credentials configuration |
86+
87+
### NutanixKonnectorAgentCredentials
88+
89+
| Field | Type | Required | Description |
90+
|-------|------|----------|-------------|
91+
| `secretRef.name` | string | Yes | Name of the Secret containing Prism Central credentials |
92+
93+
## Prerequisites
94+
95+
### 1. Prism Central Credentials Secret
96+
97+
Create a secret containing Prism Central credentials:
98+
99+
```yaml
100+
apiVersion: v1
101+
kind: Secret
102+
metadata:
103+
name: prism-central-credentials-for-konnector-agent
104+
namespace: default
105+
type: Opaque
106+
stringData:
107+
username: admin
108+
password: password
109+
```
110+
111+
## Examples
112+
113+
### Minimal Configuration
114+
115+
```yaml
116+
apiVersion: cluster.x-k8s.io/v1beta1
117+
kind: Cluster
118+
metadata:
119+
name: minimal-cluster
120+
spec:
121+
topology:
122+
variables:
123+
- name: clusterConfig
124+
value:
125+
addons:
126+
konnectorAgent: {}
127+
```
128+
129+
### With Custom Credentials
130+
131+
```yaml
132+
apiVersion: cluster.x-k8s.io/v1beta1
133+
kind: Cluster
134+
metadata:
135+
name: custom-credentials-cluster
136+
spec:
137+
topology:
138+
variables:
139+
- name: clusterConfig
140+
value:
141+
addons:
142+
konnectorAgent:
143+
strategy: HelmAddon
144+
credentials:
145+
secretRef:
146+
name: prism-central-credentials-for-konnector-agent
147+
```
148+
149+
## Default Values
150+
151+
The addon uses the following default values:
152+
153+
- **Helm Release Name**: `konnector-agent`
154+
- **Namespace**: `ntnx-system`
155+
- **Agent Name**: `konnector-agent`
156+
- **Strategy**: `HelmAddon`
157+
- **Chart**: `konnector-agent`
158+
- **Version**: `1.3.0-rc.0`
159+
160+
## Troubleshooting
161+
162+
### Common Issues
163+
164+
1. **Missing Credentials Secret**
165+
- Ensure the secret exists in the management cluster
166+
- Verify the secret name matches the configuration
167+
168+
2. **Prism Central Connectivity**
169+
- Check network connectivity between the cluster and Prism Central
170+
- Verify the Prism Central endpoint is correct
171+
- Ensure credentials are valid
172+
173+
3. **Helm Chart Issues**
174+
- Check the Helm repository is accessible
175+
- Verify the chart version exists
176+
- Review HelmChartProxy status
177+
178+
### Monitoring
179+
180+
Monitor the Konnector Agent deployment:
181+
182+
```bash
183+
# Check HelmChartProxy status
184+
kubectl get helmchartproxy -A
185+
186+
# Check agent logs
187+
kubectl logs hook-preinstall -n ntnx-system
188+
```
189+
190+
## References
191+
192+
- [Konnector Agent Repository](https://github.com/nutanix-core/k8s-agent)
193+
- [Cluster API Add-on Provider for Helm](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm)
194+
- [Cluster API Runtime Hooks](https://cluster-api.sigs.k8s.io/tasks/experimental-features/runtime-sdk/hooks.html)

examples/capi-quick-start/nutanix-cluster-calico-crs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ spec:
9090
strategy: HelmAddon
9191
snapshotController:
9292
strategy: HelmAddon
93-
konnectorAgent: {}
93+
konnectorAgent:
94+
strategy: HelmAddon
95+
credentials:
96+
secretRef:
97+
name: prism-central-credentials-for-konnector-agent
9498
nfd:
9599
strategy: ClusterResourceSet
96100
serviceLoadBalancer:

examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ spec:
8888
strategy: HelmAddon
8989
snapshotController:
9090
strategy: HelmAddon
91-
konnectorAgent: {}
91+
konnectorAgent:
92+
strategy: HelmAddon
93+
credentials:
94+
secretRef:
95+
name: prism-central-credentials-for-konnector-agent
9296
nfd: {}
9397
serviceLoadBalancer:
9498
configuration:

examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ spec:
9090
strategy: HelmAddon
9191
snapshotController:
9292
strategy: HelmAddon
93-
konnectorAgent: {}
93+
konnectorAgent:
94+
strategy: HelmAddon
95+
credentials:
96+
secretRef:
97+
name: prism-central-credentials-for-konnector-agent
9498
nfd:
9599
strategy: ClusterResourceSet
96100
serviceLoadBalancer:

examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ spec:
8888
strategy: HelmAddon
8989
snapshotController:
9090
strategy: HelmAddon
91-
konnectorAgent: {}
91+
konnectorAgent:
92+
strategy: HelmAddon
93+
credentials:
94+
secretRef:
95+
name: prism-central-credentials-for-konnector-agent
9296
nfd: {}
9397
serviceLoadBalancer:
9498
configuration:

examples/capi-quick-start/nutanix-cluster-with-failuredomains-cilium-crs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ spec:
126126
strategy: HelmAddon
127127
snapshotController:
128128
strategy: HelmAddon
129-
konnectorAgent: {}
129+
konnectorAgent:
130+
strategy: HelmAddon
131+
credentials:
132+
secretRef:
133+
name: prism-central-credentials-for-konnector-agent
130134
nfd:
131135
strategy: ClusterResourceSet
132136
serviceLoadBalancer:

examples/capi-quick-start/nutanix-cluster-with-failuredomains-cilium-helm-addon.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ spec:
124124
strategy: HelmAddon
125125
snapshotController:
126126
strategy: HelmAddon
127-
konnectorAgent: {}
127+
konnectorAgent:
128+
strategy: HelmAddon
129+
credentials:
130+
secretRef:
131+
name: prism-central-credentials-for-konnector-agent
128132
nfd: {}
129133
serviceLoadBalancer:
130134
configuration:

0 commit comments

Comments
 (0)