0
# API Group Operations
1
2
This document covers OpenShift specialized API group operations, including config, operators, monitoring, machine configuration, and other advanced API groups.
3
4
## Core Imports
5
6
```java { .api }
7
import io.fabric8.openshift.client.OpenShiftClient;
8
import io.fabric8.openshift.client.dsl.OpenShiftConfigAPIGroupDSL;
9
import io.fabric8.openshift.client.dsl.OpenShiftOperatorAPIGroupDSL;
10
import io.fabric8.openshift.client.dsl.OpenShiftMonitoringAPIGroupDSL;
11
import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL;
12
import io.fabric8.openshift.client.dsl.MachineConfigurationAPIGroupDSL;
13
import io.fabric8.openshift.client.dsl.OpenShiftMachineAPIGroupDSL;
14
import io.fabric8.openshift.client.dsl.OpenShiftClusterAutoscalingAPIGroupDSL;
15
import io.fabric8.openshift.client.dsl.OpenShiftHiveAPIGroupDSL;
16
import io.fabric8.openshift.client.dsl.OpenShiftOperatorHubAPIGroupDSL;
17
import io.fabric8.openshift.client.dsl.OpenShiftQuotaAPIGroupDSL;
18
import io.fabric8.openshift.client.dsl.OpenShiftTunedAPIGroupDSL;
19
import io.fabric8.openshift.client.dsl.OpenShiftWhereaboutsAPIGroupDSL;
20
import io.fabric8.openshift.client.dsl.OpenShiftStorageVersionMigratorApiGroupDSL;
21
```
22
23
## Config API Group (config.openshift.io)
24
25
The Config API group provides access to cluster-wide configuration resources.
26
27
### Basic Config Operations
28
29
```java { .api }
30
// Access config API group
31
OpenShiftConfigAPIGroupDSL config = client.config();
32
33
// Get cluster version information
34
ClusterVersion clusterVersion = config.clusterVersions()
35
.withName("version")
36
.get();
37
38
String currentVersion = clusterVersion.getStatus().getDesired().getVersion();
39
List<ClusterOperatorStatusCondition> conditions = clusterVersion.getStatus().getConditions();
40
41
// Get cluster operator status
42
ClusterOperatorList operators = config.clusterOperators().list();
43
for (ClusterOperator operator : operators.getItems()) {
44
String operatorName = operator.getMetadata().getName();
45
String version = operator.getStatus().getVersions().stream()
46
.filter(v -> "operator".equals(v.getName()))
47
.map(OperandVersion::getVersion)
48
.findFirst()
49
.orElse("unknown");
50
51
System.out.println("Operator: " + operatorName + " v" + version);
52
}
53
```
54
55
### Cluster Configuration Resources
56
57
```java { .api }
58
// DNS configuration
59
DNS dnsConfig = config.dnses()
60
.withName("cluster")
61
.get();
62
63
String baseDomain = dnsConfig.getSpec().getBaseDomain();
64
DNSSpec.DNSType dnsType = dnsConfig.getSpec().getDnsType();
65
66
// Ingress configuration
67
Ingress ingressConfig = config.ingresses()
68
.withName("cluster")
69
.get();
70
71
String defaultDomain = ingressConfig.getSpec().getDomain();
72
73
// Network configuration
74
Network networkConfig = config.networks()
75
.withName("cluster")
76
.get();
77
78
List<String> serviceCIDR = networkConfig.getSpec().getServiceNetwork();
79
List<ClusterNetwork> clusterNetworks = networkConfig.getSpec().getClusterNetwork();
80
81
// OAuth configuration
82
OAuth oauthConfig = config.oauths()
83
.withName("cluster")
84
.get();
85
86
List<IdentityProvider> identityProviders = oauthConfig.getSpec().getIdentityProviders();
87
```
88
89
### Infrastructure and Feature Gates
90
91
```java { .api }
92
// Infrastructure configuration
93
Infrastructure infrastructure = config.infrastructures()
94
.withName("cluster")
95
.get();
96
97
String platformType = infrastructure.getStatus().getPlatform();
98
String apiServerURL = infrastructure.getStatus().getApiServerURL();
99
String infrastructureName = infrastructure.getStatus().getInfrastructureName();
100
101
// Feature gates configuration
102
FeatureGate featureGates = config.featureGates()
103
.withName("cluster")
104
.get();
105
106
FeatureGateSelection featureSet = featureGates.getSpec().getFeatureSet();
107
108
// Image configuration
109
Image imageConfig = config.images()
110
.withName("cluster")
111
.get();
112
113
String externalRegistryHostname = imageConfig.getStatus().getExternalRegistryHostnames().get(0);
114
String internalRegistryHostname = imageConfig.getStatus().getInternalRegistryHostname();
115
```
116
117
## Operator API Group (operator.openshift.io)
118
119
The Operator API group manages OpenShift operators and their configurations.
120
121
### Operator Management
122
123
```java { .api }
124
// Access operator API group
125
OpenShiftOperatorAPIGroupDSL operator = client.operator();
126
127
// DNS operator configuration
128
DNS dnsOperator = operator.dnses()
129
.withName("default")
130
.get();
131
132
DNSSpec dnsSpec = dnsOperator.getSpec();
133
DNSStatus dnsStatus = dnsOperator.getStatus();
134
135
// Ingress controller configuration
136
IngressControllerList ingressControllers = operator.ingressControllers()
137
.inNamespace("openshift-ingress-operator")
138
.list();
139
140
for (IngressController controller : ingressControllers.getItems()) {
141
String controllerName = controller.getMetadata().getName();
142
String domain = controller.getSpec().getDomain();
143
Integer replicas = controller.getSpec().getReplicas();
144
145
System.out.println("Ingress Controller: " + controllerName +
146
" (domain: " + domain + ", replicas: " + replicas + ")");
147
}
148
149
// Network operator
150
Network networkOperator = operator.networks()
151
.withName("cluster")
152
.get();
153
154
// Console operator
155
Console consoleOperator = operator.consoles()
156
.withName("cluster")
157
.get();
158
159
String publicURL = consoleOperator.getStatus().getConsoleURL();
160
```
161
162
### Storage and Authentication Operators
163
164
```java { .api }
165
// Storage operator configuration
166
Storage storageOperator = operator.storages()
167
.withName("cluster")
168
.get();
169
170
String managementState = storageOperator.getSpec().getManagementState();
171
172
// Authentication operator
173
Authentication authOperator = operator.authentications()
174
.withName("cluster")
175
.get();
176
177
// Cloud credential operator
178
CloudCredential cloudCredOperator = operator.cloudCredentials()
179
.withName("cluster")
180
.get();
181
182
String credentialsMode = cloudCredOperator.getSpec().getCredentialsMode();
183
184
// Etcd operator
185
Etcd etcdOperator = operator.etcds()
186
.withName("cluster")
187
.get();
188
189
String etcdManagementState = etcdOperator.getSpec().getManagementState();
190
```
191
192
### Kubernetes Component Operators
193
194
```java { .api }
195
// Kubernetes API server operator
196
KubeAPIServer kubeAPIServer = operator.kubeAPIServers()
197
.withName("cluster")
198
.get();
199
200
// Kubernetes controller manager operator
201
KubeControllerManager kubeControllerManager = operator.kubeControllerManagers()
202
.withName("cluster")
203
.get();
204
205
// Kubernetes scheduler operator
206
KubeScheduler kubeScheduler = operator.kubeSchedulers()
207
.withName("cluster")
208
.get();
209
210
// OpenShift API server operator
211
OpenShiftAPIServer openshiftAPIServer = operator.openShiftAPIServers()
212
.withName("cluster")
213
.get();
214
215
// OpenShift controller manager operator
216
OpenShiftControllerManager openshiftControllerManager = operator.openShiftControllerManagers()
217
.withName("cluster")
218
.get();
219
```
220
221
## Monitoring API Group (monitoring.coreos.com)
222
223
The Monitoring API group provides access to Prometheus, Alertmanager, and related monitoring resources.
224
225
### Prometheus Operations
226
227
```java { .api }
228
// Access monitoring API group
229
OpenShiftMonitoringAPIGroupDSL monitoring = client.monitoring();
230
231
// List Prometheus instances
232
PrometheusList prometheusList = monitoring.prometheuses()
233
.inNamespace("openshift-monitoring")
234
.list();
235
236
// Get specific Prometheus instance
237
Prometheus prometheus = monitoring.prometheuses()
238
.inNamespace("openshift-monitoring")
239
.withName("k8s")
240
.get();
241
242
PrometheusSpec prometheusSpec = prometheus.getSpec();
243
String retention = prometheusSpec.getRetention();
244
String replicas = prometheusSpec.getReplicas().toString();
245
246
// Create custom Prometheus instance
247
Prometheus customPrometheus = new PrometheusBuilder()
248
.withNewMetadata()
249
.withName("custom-prometheus")
250
.withNamespace("monitoring-namespace")
251
.endMetadata()
252
.withNewSpec()
253
.withReplicas(2)
254
.withRetention("30d")
255
.withNewServiceAccountName("prometheus")
256
.withServiceMonitorSelector(new LabelSelectorBuilder()
257
.addToMatchLabels("team", "backend")
258
.build())
259
.endSpec()
260
.build();
261
262
monitoring.prometheuses()
263
.inNamespace("monitoring-namespace")
264
.create(customPrometheus);
265
```
266
267
### Service Monitor Operations
268
269
```java { .api }
270
// List service monitors
271
ServiceMonitorList serviceMonitors = monitoring.serviceMonitors()
272
.inNamespace("my-project")
273
.list();
274
275
// Create service monitor
276
ServiceMonitor serviceMonitor = new ServiceMonitorBuilder()
277
.withNewMetadata()
278
.withName("my-app-monitor")
279
.withNamespace("my-project")
280
.addToLabels("app", "my-app")
281
.endMetadata()
282
.withNewSpec()
283
.withSelector(new LabelSelectorBuilder()
284
.addToMatchLabels("app", "my-app")
285
.build())
286
.addNewEndpoint()
287
.withPort("metrics")
288
.withPath("/metrics")
289
.withInterval("30s")
290
.endEndpoint()
291
.endSpec()
292
.build();
293
294
monitoring.serviceMonitors()
295
.inNamespace("my-project")
296
.create(serviceMonitor);
297
```
298
299
### Alertmanager and Rules
300
301
```java { .api }
302
// Get Alertmanager configuration
303
AlertmanagerList alertmanagers = monitoring.alertmanagers()
304
.inNamespace("openshift-monitoring")
305
.list();
306
307
// Create Prometheus rule
308
PrometheusRule rule = new PrometheusRuleBuilder()
309
.withNewMetadata()
310
.withName("my-app-rules")
311
.withNamespace("my-project")
312
.addToLabels("prometheus", "kube-prometheus")
313
.addToLabels("role", "alert-rules")
314
.endMetadata()
315
.withNewSpec()
316
.addNewGroup()
317
.withName("my-app.rules")
318
.addNewRule()
319
.withAlert("HighErrorRate")
320
.withExpr("rate(http_requests_total{status=~\"5..\"}[5m]) > 0.1")
321
.withFor("5m")
322
.addToLabels("severity", "warning")
323
.addToAnnotations("summary", "High error rate detected")
324
.addToAnnotations("description", "Error rate is {{ $value }} errors per second")
325
.endRule()
326
.endGroup()
327
.endSpec()
328
.build();
329
330
monitoring.prometheusRules()
331
.inNamespace("my-project")
332
.create(rule);
333
```
334
335
### Pod Monitor and Probe
336
337
```java { .api }
338
// Create pod monitor
339
PodMonitor podMonitor = new PodMonitorBuilder()
340
.withNewMetadata()
341
.withName("my-pod-monitor")
342
.withNamespace("my-project")
343
.endMetadata()
344
.withNewSpec()
345
.withSelector(new LabelSelectorBuilder()
346
.addToMatchLabels("app", "my-app")
347
.build())
348
.addNewPodMetricsEndpoint()
349
.withPort("metrics")
350
.withPath("/metrics")
351
.endPodMetricsEndpoint()
352
.endSpec()
353
.build();
354
355
monitoring.podMonitors()
356
.inNamespace("my-project")
357
.create(podMonitor);
358
359
// Create probe for external monitoring
360
Probe probe = new ProbeBuilder()
361
.withNewMetadata()
362
.withName("external-service-probe")
363
.withNamespace("my-project")
364
.endMetadata()
365
.withNewSpec()
366
.withJobName("external-probe")
367
.withNewProberSpec()
368
.withUrl("https://external-service.example.com/health")
369
.endProberSpec()
370
.addNewTarget()
371
.addToStaticConfig()
372
.withStatic(Arrays.asList("https://api.example.com"))
373
.endStaticConfig()
374
.endTarget()
375
.endSpec()
376
.build();
377
378
monitoring.probes()
379
.inNamespace("my-project")
380
.create(probe);
381
```
382
383
## Machine Configuration API Group
384
385
The Machine Configuration API group manages node-level configurations.
386
387
### Machine Config Operations
388
389
```java { .api }
390
// Access machine configuration API group
391
MachineConfigurationAPIGroupDSL machineConfig = client.machineConfigurations();
392
393
// List machine configs
394
MachineConfigList configs = machineConfig.machineConfigs().list();
395
396
// Get specific machine config
397
MachineConfig config = machineConfig.machineConfigs()
398
.withName("00-worker")
399
.get();
400
401
// Create custom machine config
402
MachineConfig customConfig = new MachineConfigBuilder()
403
.withNewMetadata()
404
.withName("99-custom-config")
405
.addToLabels("machineconfiguration.openshift.io/role", "worker")
406
.endMetadata()
407
.withNewSpec()
408
.withNewConfig()
409
.withIgnition(new IgnitionBuilder()
410
.withVersion("3.2.0")
411
.build())
412
.withStorage(new StorageBuilder()
413
.addNewFile()
414
.withPath("/etc/custom-config")
415
.withNewContents()
416
.withSource("data:text/plain;base64," +
417
Base64.getEncoder().encodeToString("custom config content".getBytes()))
418
.endContents()
419
.withMode(0644)
420
.endFile()
421
.build())
422
.endConfig()
423
.endSpec()
424
.build();
425
426
machineConfig.machineConfigs().create(customConfig);
427
```
428
429
### Machine Config Pool Operations
430
431
```java { .api }
432
// List machine config pools
433
MachineConfigPoolList pools = machineConfig.machineConfigPools().list();
434
435
// Get worker pool status
436
MachineConfigPool workerPool = machineConfig.machineConfigPools()
437
.withName("worker")
438
.get();
439
440
Integer readyMachineCount = workerPool.getStatus().getReadyMachineCount();
441
Integer machineCount = workerPool.getStatus().getMachineCount();
442
String currentConfiguration = workerPool.getStatus().getConfiguration().getName();
443
444
// Pause machine config pool updates
445
MachineConfigPool pausedPool = machineConfig.machineConfigPools()
446
.withName("worker")
447
.edit(pool -> new MachineConfigPoolBuilder(pool)
448
.editSpec()
449
.withPaused(true)
450
.endSpec()
451
.build());
452
```
453
454
## Console API Group
455
456
The Console API group manages OpenShift web console configurations.
457
458
### Console Configuration
459
460
```java { .api }
461
// Access console API group
462
OpenShiftConsoleAPIGroupDSL console = client.console();
463
464
// Console links for navigation
465
ConsoleLink customLink = new ConsoleLinkBuilder()
466
.withNewMetadata()
467
.withName("custom-documentation")
468
.endMetadata()
469
.withNewSpec()
470
.withLocation(ConsoleLinkLocation.HelpMenu)
471
.withText("Custom Documentation")
472
.withHref("https://docs.example.com")
473
.endSpec()
474
.build();
475
476
console.consoleLinks().create(customLink);
477
478
// Console notification
479
ConsoleNotification notification = new ConsoleNotificationBuilder()
480
.withNewMetadata()
481
.withName("maintenance-notice")
482
.endMetadata()
483
.withNewSpec()
484
.withText("Scheduled maintenance window: Saturday 2AM-4AM UTC")
485
.withLocation(ConsoleNotificationLocation.BannerTop)
486
.withColor("#ff0000")
487
.endSpec()
488
.build();
489
490
console.consoleNotifications().create(notification);
491
```
492
493
## Cluster Autoscaling API Group
494
495
The Cluster Autoscaling API group manages automatic cluster scaling.
496
497
### Cluster Autoscaler Configuration
498
499
```java { .api }
500
// Access cluster autoscaling API group
501
OpenShiftClusterAutoscalingAPIGroupDSL clusterAutoscaling = client.clusterAutoscaling();
502
503
// Create cluster autoscaler
504
ClusterAutoscaler autoscaler = new ClusterAutoscalerBuilder()
505
.withNewMetadata()
506
.withName("default")
507
.endMetadata()
508
.withNewSpec()
509
.withScaleDownDelayAfterAdd("10m")
510
.withScaleDownDelayAfterDelete("10s")
511
.withScaleDownDelayAfterFailure("3m")
512
.withScaleDownUnneededTime("10m")
513
.withSkipNodesWithLocalStorage(true)
514
.withSkipNodesWithSystemPods(true)
515
.endSpec()
516
.build();
517
518
clusterAutoscaling.clusterAutoscalers().create(autoscaler);
519
520
// Create machine autoscaler
521
MachineAutoscaler machineAutoscaler = new MachineAutoscalerBuilder()
522
.withNewMetadata()
523
.withName("worker-autoscaler")
524
.withNamespace("openshift-machine-api")
525
.endMetadata()
526
.withNewSpec()
527
.withMinReplicas(1)
528
.withMaxReplicas(12)
529
.withNewScaleTargetRef()
530
.withApiVersion("machine.openshift.io/v1beta1")
531
.withKind("MachineSet")
532
.withName("worker-machineset")
533
.endScaleTargetRef()
534
.endSpec()
535
.build();
536
537
clusterAutoscaling.machineAutoscalers()
538
.inNamespace("openshift-machine-api")
539
.create(machineAutoscaler);
540
```
541
542
## Usage Examples
543
544
### Complete Cluster Configuration Example
545
546
```java
547
import io.fabric8.openshift.client.OpenShiftClient;
548
import io.fabric8.openshift.client.dsl.*;
549
550
public class ClusterConfigurationManager {
551
private final OpenShiftClient client;
552
553
public ClusterConfigurationManager(OpenShiftClient client) {
554
this.client = client;
555
}
556
557
public void auditClusterConfiguration() {
558
System.out.println("=== Cluster Configuration Audit ===\n");
559
560
auditClusterVersion();
561
auditOperatorStatus();
562
auditInfrastructure();
563
auditNetworkConfiguration();
564
auditMonitoringSetup();
565
}
566
567
private void auditClusterVersion() {
568
System.out.println("Cluster Version:");
569
570
ClusterVersion version = client.config().clusterVersions()
571
.withName("version")
572
.get();
573
574
if (version != null) {
575
System.out.println(" Current: " + version.getStatus().getDesired().getVersion());
576
System.out.println(" Channel: " + version.getSpec().getChannel());
577
578
List<Update> availableUpdates = version.getStatus().getAvailableUpdates();
579
if (availableUpdates != null && !availableUpdates.isEmpty()) {
580
System.out.println(" Available Updates:");
581
availableUpdates.forEach(update ->
582
System.out.println(" " + update.getVersion()));
583
}
584
}
585
System.out.println();
586
}
587
588
private void auditOperatorStatus() {
589
System.out.println("Operator Status:");
590
591
ClusterOperatorList operators = client.config().clusterOperators().list();
592
593
for (ClusterOperator operator : operators.getItems()) {
594
String name = operator.getMetadata().getName();
595
596
boolean available = operator.getStatus().getConditions().stream()
597
.anyMatch(condition ->
598
"Available".equals(condition.getType()) &&
599
"True".equals(condition.getStatus()));
600
601
boolean progressing = operator.getStatus().getConditions().stream()
602
.anyMatch(condition ->
603
"Progressing".equals(condition.getType()) &&
604
"True".equals(condition.getStatus()));
605
606
System.out.println(" " + name + ": " +
607
(available ? "Available" : "Not Available") +
608
(progressing ? " (Progressing)" : ""));
609
}
610
System.out.println();
611
}
612
613
private void auditInfrastructure() {
614
System.out.println("Infrastructure:");
615
616
Infrastructure infra = client.config().infrastructures()
617
.withName("cluster")
618
.get();
619
620
if (infra != null) {
621
System.out.println(" Platform: " + infra.getStatus().getPlatform());
622
System.out.println(" Region: " + infra.getStatus().getPlatformStatus().getAws().getRegion());
623
System.out.println(" API Server: " + infra.getStatus().getApiServerURL());
624
}
625
System.out.println();
626
}
627
628
private void auditNetworkConfiguration() {
629
System.out.println("Network Configuration:");
630
631
Network network = client.config().networks()
632
.withName("cluster")
633
.get();
634
635
if (network != null) {
636
System.out.println(" Service Network: " +
637
String.join(", ", network.getSpec().getServiceNetwork()));
638
639
System.out.println(" Cluster Networks:");
640
network.getSpec().getClusterNetwork().forEach(cn ->
641
System.out.println(" " + cn.getCidr() + " (host prefix: " +
642
cn.getHostPrefix() + ")"));
643
}
644
System.out.println();
645
}
646
647
private void auditMonitoringSetup() {
648
System.out.println("Monitoring Setup:");
649
650
try {
651
PrometheusList prometheuses = client.monitoring().prometheuses()
652
.inNamespace("openshift-monitoring")
653
.list();
654
655
System.out.println(" Prometheus Instances: " + prometheuses.getItems().size());
656
657
AlertmanagerList alertmanagers = client.monitoring().alertmanagers()
658
.inNamespace("openshift-monitoring")
659
.list();
660
661
System.out.println(" Alertmanager Instances: " + alertmanagers.getItems().size());
662
663
} catch (Exception e) {
664
System.out.println(" Monitoring API not accessible: " + e.getMessage());
665
}
666
System.out.println();
667
}
668
669
public void setupApplicationMonitoring(String namespace, String appName) {
670
// Create service monitor for application
671
ServiceMonitor serviceMonitor = new ServiceMonitorBuilder()
672
.withNewMetadata()
673
.withName(appName + "-monitor")
674
.withNamespace(namespace)
675
.addToLabels("app", appName)
676
.endMetadata()
677
.withNewSpec()
678
.withSelector(new LabelSelectorBuilder()
679
.addToMatchLabels("app", appName)
680
.build())
681
.addNewEndpoint()
682
.withPort("metrics")
683
.withPath("/metrics")
684
.withInterval("30s")
685
.endEndpoint()
686
.endSpec()
687
.build();
688
689
client.monitoring().serviceMonitors()
690
.inNamespace(namespace)
691
.createOrReplace(serviceMonitor);
692
693
// Create alerting rules
694
PrometheusRule rules = new PrometheusRuleBuilder()
695
.withNewMetadata()
696
.withName(appName + "-rules")
697
.withNamespace(namespace)
698
.addToLabels("prometheus", "kube-prometheus")
699
.addToLabels("role", "alert-rules")
700
.endMetadata()
701
.withNewSpec()
702
.addNewGroup()
703
.withName(appName + ".rules")
704
.addNewRule()
705
.withAlert("ApplicationDown")
706
.withExpr("up{job=\"" + appName + "\"} == 0")
707
.withFor("5m")
708
.addToLabels("severity", "critical")
709
.addToAnnotations("summary", appName + " is down")
710
.addToAnnotations("description",
711
"Application " + appName + " has been down for more than 5 minutes")
712
.endRule()
713
.addNewRule()
714
.withAlert("HighResponseTime")
715
.withExpr("histogram_quantile(0.95, rate(http_request_duration_seconds_bucket{job=\"" +
716
appName + "\"}[5m])) > 1")
717
.withFor("10m")
718
.addToLabels("severity", "warning")
719
.addToAnnotations("summary", "High response time for " + appName)
720
.addToAnnotations("description",
721
"95th percentile response time is {{ $value }} seconds")
722
.endRule()
723
.endGroup()
724
.endSpec()
725
.build();
726
727
client.monitoring().prometheusRules()
728
.inNamespace(namespace)
729
.createOrReplace(rules);
730
731
System.out.println("Monitoring setup completed for: " + appName);
732
}
733
}
734
```
735
736
## Types
737
738
The API group operations work with many specialized types. Here are key examples:
739
740
### Config API Group Types
741
742
```java { .api }
743
// ClusterVersion for cluster version information
744
public class ClusterVersion implements HasMetadata {
745
public ObjectMeta getMetadata();
746
public ClusterVersionSpec getSpec();
747
public ClusterVersionStatus getStatus();
748
}
749
750
// ClusterOperator for operator status
751
public class ClusterOperator implements HasMetadata {
752
public ObjectMeta getMetadata();
753
public ClusterOperatorSpec getSpec();
754
public ClusterOperatorStatus getStatus();
755
}
756
```
757
758
### Monitoring API Group Types
759
760
```java { .api }
761
// Prometheus instance configuration
762
public class Prometheus implements HasMetadata {
763
public ObjectMeta getMetadata();
764
public PrometheusSpec getSpec();
765
public PrometheusStatus getStatus();
766
}
767
768
// ServiceMonitor for service monitoring
769
public class ServiceMonitor implements HasMetadata {
770
public ObjectMeta getMetadata();
771
public ServiceMonitorSpec getSpec();
772
}
773
```
774
775
### Machine Configuration Types
776
777
```java { .api }
778
// MachineConfig for node configuration
779
public class MachineConfig implements HasMetadata {
780
public ObjectMeta getMetadata();
781
public MachineConfigSpec getSpec();
782
}
783
784
// MachineConfigPool for managing machine groups
785
public class MachineConfigPool implements HasMetadata {
786
public ObjectMeta getMetadata();
787
public MachineConfigPoolSpec getSpec();
788
public MachineConfigPoolStatus getStatus();
789
}
790
```