@techwavedev/agi-agent-kit 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.
- package/CHANGELOG.md +82 -1
- package/README.md +190 -12
- package/bin/init.js +30 -2
- package/package.json +6 -3
- package/templates/base/AGENTS.md +54 -23
- package/templates/base/README.md +325 -0
- package/templates/base/directives/memory_integration.md +95 -0
- package/templates/base/execution/memory_manager.py +309 -0
- package/templates/base/execution/session_boot.py +218 -0
- package/templates/base/execution/session_init.py +320 -0
- package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
- package/templates/base/skill-creator/scripts/init_skill.py +18 -135
- package/templates/skills/ec/README.md +31 -0
- package/templates/skills/ec/aws/SKILL.md +1020 -0
- package/templates/skills/ec/aws/defaults.yaml +13 -0
- package/templates/skills/ec/aws/references/common_patterns.md +80 -0
- package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
- package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
- package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
- package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
- package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
- package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
- package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
- package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
- package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
- package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
- package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
- package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
- package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
- package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
- package/templates/skills/ec/consul/SKILL.md +427 -0
- package/templates/skills/ec/consul/references/acl_setup.md +168 -0
- package/templates/skills/ec/consul/references/ha_config.md +196 -0
- package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
- package/templates/skills/ec/consul/references/upgrades.md +213 -0
- package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
- package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
- package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
- package/templates/skills/ec/documentation/SKILL.md +351 -0
- package/templates/skills/ec/documentation/references/best_practices.md +201 -0
- package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
- package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
- package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
- package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
- package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
- package/templates/skills/ec/gitlab/SKILL.md +529 -0
- package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
- package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
- package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
- package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
- package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
- package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
- package/templates/skills/ec/jira/SKILL.md +484 -0
- package/templates/skills/ec/jira/references/jql_reference.md +148 -0
- package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
- package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
- package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
- package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
- package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
- package/templates/skills/ec/jira/scripts/log_work.py +154 -0
- package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
- package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
- package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
- package/templates/skills/ec/karpenter/SKILL.md +301 -0
- package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
- package/templates/skills/ec/karpenter/references/migration.md +396 -0
- package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
- package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
- package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
- package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
- package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
- package/templates/skills/ec/opensearch/SKILL.md +720 -0
- package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
- package/templates/skills/ec/opensearch/references/operator.md +532 -0
- package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
- package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
- package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
- package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
- package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
- package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
- package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
- package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
- package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
- package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
- package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
- package/templates/skills/knowledge/design-md/README.md +0 -34
- package/templates/skills/knowledge/design-md/SKILL.md +0 -193
- package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
- package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
- package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
- package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
- package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
- package/templates/skills/knowledge/react-components/README.md +0 -36
- package/templates/skills/knowledge/react-components/SKILL.md +0 -53
- package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
- package/templates/skills/knowledge/react-components/package-lock.json +0 -231
- package/templates/skills/knowledge/react-components/package.json +0 -16
- package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
- package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
- package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
- package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
- package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
- package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
- package/templates/skills/knowledge/self-update/SKILL.md +0 -60
- package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
- package/templates/skills/knowledge/stitch-loop/README.md +0 -54
- package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
- package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
- package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
- package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
- package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
# OpenSearch Kubernetes Operator Reference
|
|
2
|
+
|
|
3
|
+
Deploy and manage OpenSearch clusters on Kubernetes using the official OpenSearch Operator.
|
|
4
|
+
|
|
5
|
+
## Official Resources
|
|
6
|
+
|
|
7
|
+
- **GitHub:** https://github.com/opensearch-project/opensearch-k8s-operator
|
|
8
|
+
- **Documentation:** https://docs.opensearch.org/latest/install-and-configure/install-opensearch/operator/
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### Prerequisites
|
|
15
|
+
|
|
16
|
+
- Kubernetes 1.23+
|
|
17
|
+
- Helm 3.x
|
|
18
|
+
- kubectl with cluster admin access
|
|
19
|
+
- StorageClass with dynamic provisioning (recommended)
|
|
20
|
+
|
|
21
|
+
### Install via Helm
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Add the OpenSearch Operator Helm repository
|
|
25
|
+
helm repo add opensearch-operator https://opensearch-project.github.io/opensearch-k8s-operator/
|
|
26
|
+
helm repo update
|
|
27
|
+
|
|
28
|
+
# Install the operator
|
|
29
|
+
helm install opensearch-operator opensearch-operator/opensearch-operator \
|
|
30
|
+
--namespace opensearch-operator-system \
|
|
31
|
+
--create-namespace \
|
|
32
|
+
--version 2.6.0
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Verify Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
kubectl get pods -n opensearch-operator-system
|
|
39
|
+
kubectl get crd | grep opensearch
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Cluster Deployment
|
|
45
|
+
|
|
46
|
+
### Minimal Cluster
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
apiVersion: opensearch.opster.io/v1
|
|
50
|
+
kind: OpenSearchCluster
|
|
51
|
+
metadata:
|
|
52
|
+
name: my-cluster
|
|
53
|
+
namespace: opensearch
|
|
54
|
+
spec:
|
|
55
|
+
general:
|
|
56
|
+
serviceName: my-cluster
|
|
57
|
+
version: 2.17.0
|
|
58
|
+
httpPort: 9200
|
|
59
|
+
vendor: opensearch
|
|
60
|
+
setVMMaxMapCount: true
|
|
61
|
+
nodePools:
|
|
62
|
+
- component: nodes
|
|
63
|
+
replicas: 3
|
|
64
|
+
diskSize: "30Gi"
|
|
65
|
+
roles:
|
|
66
|
+
- cluster_manager
|
|
67
|
+
- data
|
|
68
|
+
- ingest
|
|
69
|
+
resources:
|
|
70
|
+
requests:
|
|
71
|
+
memory: "2Gi"
|
|
72
|
+
cpu: "500m"
|
|
73
|
+
limits:
|
|
74
|
+
memory: "4Gi"
|
|
75
|
+
cpu: "2000m"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Production Cluster (Dedicated Roles)
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
apiVersion: opensearch.opster.io/v1
|
|
82
|
+
kind: OpenSearchCluster
|
|
83
|
+
metadata:
|
|
84
|
+
name: production-cluster
|
|
85
|
+
namespace: opensearch
|
|
86
|
+
spec:
|
|
87
|
+
general:
|
|
88
|
+
serviceName: production-cluster
|
|
89
|
+
version: 2.17.0
|
|
90
|
+
httpPort: 9200
|
|
91
|
+
vendor: opensearch
|
|
92
|
+
setVMMaxMapCount: true
|
|
93
|
+
pluginsList:
|
|
94
|
+
- "repository-s3"
|
|
95
|
+
additionalConfig:
|
|
96
|
+
indices.query.bool.max_clause_count: "4096"
|
|
97
|
+
search.max_buckets: "20000"
|
|
98
|
+
|
|
99
|
+
dashboards:
|
|
100
|
+
enable: true
|
|
101
|
+
version: 2.17.0
|
|
102
|
+
replicas: 2
|
|
103
|
+
resources:
|
|
104
|
+
requests:
|
|
105
|
+
memory: "512Mi"
|
|
106
|
+
cpu: "200m"
|
|
107
|
+
limits:
|
|
108
|
+
memory: "1Gi"
|
|
109
|
+
cpu: "500m"
|
|
110
|
+
|
|
111
|
+
nodePools:
|
|
112
|
+
# Dedicated cluster managers (odd number for quorum)
|
|
113
|
+
- component: cluster-manager
|
|
114
|
+
replicas: 3
|
|
115
|
+
diskSize: "10Gi"
|
|
116
|
+
roles:
|
|
117
|
+
- cluster_manager
|
|
118
|
+
resources:
|
|
119
|
+
requests:
|
|
120
|
+
memory: "2Gi"
|
|
121
|
+
cpu: "500m"
|
|
122
|
+
limits:
|
|
123
|
+
memory: "2Gi"
|
|
124
|
+
cpu: "1000m"
|
|
125
|
+
persistence:
|
|
126
|
+
storageClass: gp3
|
|
127
|
+
accessModes:
|
|
128
|
+
- ReadWriteOnce
|
|
129
|
+
jvm: "-Xms1g -Xmx1g"
|
|
130
|
+
|
|
131
|
+
# Hot data nodes (recent data, SSDs)
|
|
132
|
+
- component: data-hot
|
|
133
|
+
replicas: 3
|
|
134
|
+
diskSize: "500Gi"
|
|
135
|
+
roles:
|
|
136
|
+
- data
|
|
137
|
+
- ingest
|
|
138
|
+
nodeSelector:
|
|
139
|
+
node-type: hot
|
|
140
|
+
resources:
|
|
141
|
+
requests:
|
|
142
|
+
memory: "16Gi"
|
|
143
|
+
cpu: "4000m"
|
|
144
|
+
limits:
|
|
145
|
+
memory: "16Gi"
|
|
146
|
+
cpu: "8000m"
|
|
147
|
+
persistence:
|
|
148
|
+
storageClass: gp3-fast
|
|
149
|
+
accessModes:
|
|
150
|
+
- ReadWriteOnce
|
|
151
|
+
jvm: "-Xms8g -Xmx8g"
|
|
152
|
+
additionalConfig:
|
|
153
|
+
node.attr.temp: "hot"
|
|
154
|
+
|
|
155
|
+
# Warm data nodes (older data, HDDs)
|
|
156
|
+
- component: data-warm
|
|
157
|
+
replicas: 2
|
|
158
|
+
diskSize: "2Ti"
|
|
159
|
+
roles:
|
|
160
|
+
- data
|
|
161
|
+
nodeSelector:
|
|
162
|
+
node-type: warm
|
|
163
|
+
resources:
|
|
164
|
+
requests:
|
|
165
|
+
memory: "8Gi"
|
|
166
|
+
cpu: "2000m"
|
|
167
|
+
limits:
|
|
168
|
+
memory: "8Gi"
|
|
169
|
+
cpu: "4000m"
|
|
170
|
+
persistence:
|
|
171
|
+
storageClass: gp3-standard
|
|
172
|
+
accessModes:
|
|
173
|
+
- ReadWriteOnce
|
|
174
|
+
jvm: "-Xms4g -Xmx4g"
|
|
175
|
+
additionalConfig:
|
|
176
|
+
node.attr.temp: "warm"
|
|
177
|
+
|
|
178
|
+
# Coordinating nodes (query routing)
|
|
179
|
+
- component: coordinating
|
|
180
|
+
replicas: 2
|
|
181
|
+
diskSize: "10Gi"
|
|
182
|
+
roles: [] # No roles = coordinating only
|
|
183
|
+
resources:
|
|
184
|
+
requests:
|
|
185
|
+
memory: "4Gi"
|
|
186
|
+
cpu: "1000m"
|
|
187
|
+
limits:
|
|
188
|
+
memory: "4Gi"
|
|
189
|
+
cpu: "2000m"
|
|
190
|
+
jvm: "-Xms2g -Xmx2g"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Security Configuration
|
|
196
|
+
|
|
197
|
+
### TLS Certificates
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
spec:
|
|
201
|
+
security:
|
|
202
|
+
tls:
|
|
203
|
+
transport:
|
|
204
|
+
generate: true
|
|
205
|
+
perNode: true
|
|
206
|
+
http:
|
|
207
|
+
generate: true
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Custom Certificates
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
spec:
|
|
214
|
+
security:
|
|
215
|
+
tls:
|
|
216
|
+
transport:
|
|
217
|
+
secret:
|
|
218
|
+
name: opensearch-transport-certs
|
|
219
|
+
generate: false
|
|
220
|
+
http:
|
|
221
|
+
secret:
|
|
222
|
+
name: opensearch-http-certs
|
|
223
|
+
generate: false
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Admin Credentials
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Create admin credentials secret
|
|
230
|
+
kubectl create secret generic admin-credentials \
|
|
231
|
+
--from-literal=username=admin \
|
|
232
|
+
--from-literal=password='StrongP@ssw0rd!' \
|
|
233
|
+
-n opensearch
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
spec:
|
|
238
|
+
security:
|
|
239
|
+
config:
|
|
240
|
+
adminCredentialsSecret:
|
|
241
|
+
name: admin-credentials
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Security Config Secret
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
spec:
|
|
248
|
+
security:
|
|
249
|
+
config:
|
|
250
|
+
securityConfigSecret:
|
|
251
|
+
name: security-config
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Create the security config:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
kubectl create secret generic security-config \
|
|
258
|
+
--from-file=internal_users.yml \
|
|
259
|
+
--from-file=roles.yml \
|
|
260
|
+
--from-file=roles_mapping.yml \
|
|
261
|
+
--from-file=config.yml \
|
|
262
|
+
-n opensearch
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Scaling
|
|
268
|
+
|
|
269
|
+
### Horizontal Scaling
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Scale data nodes
|
|
273
|
+
kubectl patch opensearchcluster my-cluster -n opensearch \
|
|
274
|
+
--type='json' \
|
|
275
|
+
-p='[{"op": "replace", "path": "/spec/nodePools/0/replicas", "value": 5}]'
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Vertical Scaling
|
|
279
|
+
|
|
280
|
+
```yaml
|
|
281
|
+
nodePools:
|
|
282
|
+
- component: data
|
|
283
|
+
resources:
|
|
284
|
+
requests:
|
|
285
|
+
memory: "8Gi" # Increased from 4Gi
|
|
286
|
+
cpu: "2000m"
|
|
287
|
+
limits:
|
|
288
|
+
memory: "8Gi"
|
|
289
|
+
cpu: "4000m"
|
|
290
|
+
jvm: "-Xms4g -Xmx4g" # 50% of memory
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Disk Expansion
|
|
294
|
+
|
|
295
|
+
```yaml
|
|
296
|
+
nodePools:
|
|
297
|
+
- component: data
|
|
298
|
+
diskSize: "200Gi" # Increased from 100Gi
|
|
299
|
+
persistence:
|
|
300
|
+
storageClass: gp3 # Must support volume expansion
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Upgrades
|
|
306
|
+
|
|
307
|
+
### Rolling Upgrade
|
|
308
|
+
|
|
309
|
+
```yaml
|
|
310
|
+
spec:
|
|
311
|
+
general:
|
|
312
|
+
version: 2.18.0 # New version
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
The operator performs rolling upgrades automatically.
|
|
316
|
+
|
|
317
|
+
### Upgrade Strategy
|
|
318
|
+
|
|
319
|
+
```yaml
|
|
320
|
+
spec:
|
|
321
|
+
general:
|
|
322
|
+
version: 2.18.0
|
|
323
|
+
nodePools:
|
|
324
|
+
- component: data
|
|
325
|
+
pdb:
|
|
326
|
+
enable: true
|
|
327
|
+
minAvailable: 2 # Ensure availability during upgrade
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Plugins
|
|
333
|
+
|
|
334
|
+
### Install Plugins
|
|
335
|
+
|
|
336
|
+
```yaml
|
|
337
|
+
spec:
|
|
338
|
+
general:
|
|
339
|
+
pluginsList:
|
|
340
|
+
- "repository-s3"
|
|
341
|
+
- "analysis-icu"
|
|
342
|
+
- "ingest-attachment"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Custom Plugin from URL
|
|
346
|
+
|
|
347
|
+
```yaml
|
|
348
|
+
spec:
|
|
349
|
+
general:
|
|
350
|
+
pluginsList:
|
|
351
|
+
- "https://example.com/plugins/my-plugin-1.0.0.zip"
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Snapshots & Backups
|
|
357
|
+
|
|
358
|
+
### S3 Repository
|
|
359
|
+
|
|
360
|
+
```yaml
|
|
361
|
+
spec:
|
|
362
|
+
general:
|
|
363
|
+
pluginsList:
|
|
364
|
+
- "repository-s3"
|
|
365
|
+
keystore:
|
|
366
|
+
- secret:
|
|
367
|
+
name: s3-credentials
|
|
368
|
+
keyMappings:
|
|
369
|
+
access_key: s3.client.default.access_key
|
|
370
|
+
secret_key: s3.client.default.secret_key
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
# Create S3 credentials secret
|
|
375
|
+
kubectl create secret generic s3-credentials \
|
|
376
|
+
--from-literal=access_key=AKIAXXXXXXXX \
|
|
377
|
+
--from-literal=secret_key=xxxxxxxxxxxx \
|
|
378
|
+
-n opensearch
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Register Repository
|
|
382
|
+
|
|
383
|
+
```json
|
|
384
|
+
PUT /_snapshot/s3-backup
|
|
385
|
+
{
|
|
386
|
+
"type": "s3",
|
|
387
|
+
"settings": {
|
|
388
|
+
"bucket": "opensearch-backups",
|
|
389
|
+
"base_path": "snapshots",
|
|
390
|
+
"region": "eu-west-1"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Monitoring
|
|
398
|
+
|
|
399
|
+
### Prometheus Integration
|
|
400
|
+
|
|
401
|
+
```yaml
|
|
402
|
+
spec:
|
|
403
|
+
general:
|
|
404
|
+
monitoring:
|
|
405
|
+
enable: true
|
|
406
|
+
scrapeInterval: "30s"
|
|
407
|
+
pluginUrl: "https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.17.0.0/prometheus-exporter-2.17.0.0.zip"
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### ServiceMonitor (Prometheus Operator)
|
|
411
|
+
|
|
412
|
+
```yaml
|
|
413
|
+
apiVersion: monitoring.coreos.com/v1
|
|
414
|
+
kind: ServiceMonitor
|
|
415
|
+
metadata:
|
|
416
|
+
name: opensearch
|
|
417
|
+
namespace: opensearch
|
|
418
|
+
spec:
|
|
419
|
+
selector:
|
|
420
|
+
matchLabels:
|
|
421
|
+
opster.io/opensearch-cluster: my-cluster
|
|
422
|
+
endpoints:
|
|
423
|
+
- port: http
|
|
424
|
+
path: /_prometheus/metrics
|
|
425
|
+
interval: 30s
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Ingress
|
|
431
|
+
|
|
432
|
+
### NGINX Ingress
|
|
433
|
+
|
|
434
|
+
```yaml
|
|
435
|
+
apiVersion: networking.k8s.io/v1
|
|
436
|
+
kind: Ingress
|
|
437
|
+
metadata:
|
|
438
|
+
name: opensearch-ingress
|
|
439
|
+
namespace: opensearch
|
|
440
|
+
annotations:
|
|
441
|
+
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
|
442
|
+
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
|
443
|
+
spec:
|
|
444
|
+
ingressClassName: nginx
|
|
445
|
+
rules:
|
|
446
|
+
- host: opensearch.example.com
|
|
447
|
+
http:
|
|
448
|
+
paths:
|
|
449
|
+
- path: /
|
|
450
|
+
pathType: Prefix
|
|
451
|
+
backend:
|
|
452
|
+
service:
|
|
453
|
+
name: my-cluster
|
|
454
|
+
port:
|
|
455
|
+
number: 9200
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Dashboards Ingress
|
|
459
|
+
|
|
460
|
+
```yaml
|
|
461
|
+
apiVersion: networking.k8s.io/v1
|
|
462
|
+
kind: Ingress
|
|
463
|
+
metadata:
|
|
464
|
+
name: opensearch-dashboards
|
|
465
|
+
namespace: opensearch
|
|
466
|
+
spec:
|
|
467
|
+
ingressClassName: nginx
|
|
468
|
+
rules:
|
|
469
|
+
- host: dashboards.example.com
|
|
470
|
+
http:
|
|
471
|
+
paths:
|
|
472
|
+
- path: /
|
|
473
|
+
pathType: Prefix
|
|
474
|
+
backend:
|
|
475
|
+
service:
|
|
476
|
+
name: my-cluster-dashboards
|
|
477
|
+
port:
|
|
478
|
+
number: 5601
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Troubleshooting
|
|
484
|
+
|
|
485
|
+
### Check Operator Logs
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
kubectl logs -n opensearch-operator-system \
|
|
489
|
+
-l control-plane=controller-manager -f
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### Check Cluster Status
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
kubectl get opensearchclusters -n opensearch
|
|
496
|
+
kubectl describe opensearchcluster my-cluster -n opensearch
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Check Pod Status
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
kubectl get pods -n opensearch -l opster.io/opensearch-cluster=my-cluster
|
|
503
|
+
kubectl logs -n opensearch my-cluster-nodes-0
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Common Issues
|
|
507
|
+
|
|
508
|
+
| Issue | Solution |
|
|
509
|
+
| -------------------- | ---------------------------------------- |
|
|
510
|
+
| Pods in Pending | Check PVC status, StorageClass |
|
|
511
|
+
| Cluster Yellow | Check replica allocation, node resources |
|
|
512
|
+
| Init container fails | Verify sysctl settings, vm.max_map_count |
|
|
513
|
+
| TLS errors | Regenerate certificates, check secrets |
|
|
514
|
+
| Memory issues | Adjust JVM heap, check limits |
|
|
515
|
+
|
|
516
|
+
### Force Pod Restart
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
kubectl delete pod my-cluster-nodes-0 -n opensearch
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## Best Practices
|
|
525
|
+
|
|
526
|
+
1. **Always use dedicated cluster managers** (3 or 5 for quorum)
|
|
527
|
+
2. **Set JVM heap to 50% of memory** (max 32GB)
|
|
528
|
+
3. **Use PodDisruptionBudgets** for availability
|
|
529
|
+
4. **Enable TLS** for transport and HTTP
|
|
530
|
+
5. **Regular snapshots** to S3 or other repository
|
|
531
|
+
6. **Monitor cluster health** with Prometheus
|
|
532
|
+
7. **Use node selectors** for hot/warm architecture
|