Skip to content
Closed
39 changes: 33 additions & 6 deletions docs/CustomResources.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ you can use to manage Splunk Enterprise deployments in your Kubernetes cluster.
- [SearchHeadCluster Resource Spec Parameters](#searchheadcluster-resource-spec-parameters)
- [ClusterMaster Resource Spec Parameters](#clustermaster-resource-spec-parameters)
- [IndexerCluster Resource Spec Parameters](#indexercluster-resource-spec-parameters)
- [MonitoringConsole Resource Spec Parameters](#monitoringconsole-resource-spec-parameters)
- [Examples of Guaranteed and Burstable QoS](#examples-of-guaranteed-and-burstable-qos)

For examples on how to use these custom resources, please see
Expand Down Expand Up @@ -86,6 +87,7 @@ configuration parameters:
| extraEnv | [EnvVar](https://v1-17.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvar-v1-core) | Sets the extra environment variables to be passed to the Splunk instance containers. WARNING: Setting environment variables used by Splunk or Ansible will affect Splunk installation and operation |
| schedulerName | string | Name of [Scheduler](https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/) to use for pod placement (defaults to "default-scheduler") |
| affinity | [Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#affinity-v1-core) | [Kubernetes Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) rules that control how pods are assigned to particular nodes |
| monitoringConsoleRef | string | Logical name assigned to the Monitoring Console pod. You can set the name before or after the MC pod creation.|
| resources | [ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#resourcerequirements-v1-core) | The settings for allocating [compute resource requirements](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) to use for each pod instance. The default settings should be considered for demo/test purposes. Please see [Hardware Resource Requirements](https://github.com/splunk/splunk-operator/blob/develop/docs/README.md#hardware-resources-requirements) for production values.|
| serviceTemplate | [Service](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#service-v1-core) | Template used to create Kubernetes [Services](https://kubernetes.io/docs/concepts/services-networking/service/) |

Expand Down Expand Up @@ -244,16 +246,41 @@ the `IndexerCluster` resource provides the following `Spec` configuration parame
| replicas | integer | The number of indexer cluster members (defaults to 1) |


## MonitoringConsole Resource Spec Parameters

```
apiVersion: enterprise.splunk.com/v1
kind: Standalone
metadata:
name: s1
finalizers:
- enterprise.splunk.com/delete-pvc
spec:
monitoringConsoleRef:
name: example_mc
```

Use the Monitoring Console to view detailed topology and performance information about your Splunk Enterprise deployment. See [What can the Monitoring Console do?](https://docs.splunk.com/Documentation/Splunk/latest/DMC/WhatcanDMCdo) in the Splunk Enterprise documentation.

The Splunk Operator now includes a CRD for the Monitoring Console (MC). This offers a number of advantages available to other CR's, including: customizable resource allocation, app management, and license management.

* An MC pod is not created automatically in the default namespace when using other Splunk Operator CR's.
* When upgrading to the latest Splunk Operator, any previously automated MC pods will be deleted.
* To associate a new MC pod with an existing CR, you must update any CR's and add the `monitoringConsoleRef` parameter.

The MC pod is referenced by using the `monitoringConsoleRef` parameter. There is no preferred order when running an MC pod; you can start the pod before or after the other CR's in the namespace. The MC pod will automatically update itself on the creation or deletion of the pods that have a reference set to the MC pod, and will automatically configure a connection to those pods.


## Examples of Guaranteed and Burstable QoS

You can change the CPU and memory resources, and assign different Quality of Services (QoS) classes to your pods using the [Kubernetes Quality of Service section](README.md#using-kubernetes-quality-of-service-classes). Here are some examples:

### A Guaranteed QoS Class example:
The minimum resource requirements for a Standalone Splunk Enterprise instance are 24 vCPU and 12GB RAM. Set equal ```requests``` and ```limits``` values for CPU and memory to establish a QoS class of Guaranteed.
Set equal ```requests``` and ```limits``` values for CPU and memory to establish a QoS class of Guaranteed.

*Note: A pod will not start on a node that cannot meet the CPU and memory ```requests``` value.*
*Note: A pod will not start on a node that cannot meet the CPU and memory ```requests``` values.*

Example:
Example: The minimum resource requirements for a Standalone Splunk Enterprise instance in production are 24 vCPU and 12GB RAM.

```yaml
apiVersion: enterprise.splunk.com/v2
Expand All @@ -272,9 +299,9 @@ spec:
```

### A Burstable QoS Class example:
Set the ```requests``` value for CPU and memory lower than the ```limits``` value to establish a QoS class of Burstable. The Standalone Splunk Enterprise instance should start with minimal indexing and search capacity, but should be allowed to scale up if Kubernetes is able to allocate additional CPU and Memory upto ```limits``` values.
Set the ```requests``` value for CPU and memory lower than the ```limits``` value to establish a QoS class of Burstable.

Example:
Example: This Standalone Splunk Enterprise instance should start with minimal indexing and search capacity, but will be allowed to scale up if Kubernetes is able to allocate additional CPU and Memory up to the ```limits``` values.

```yaml
apiVersion: enterprise.splunk.com/v2
Expand All @@ -293,7 +320,7 @@ spec:
```

### A BestEffort QoS Class example:
With no requests or limits values set for CPU and memory, the QoS class is set to BestEffort. As the Splunk Operator sets the default values for resources when you don’t provide any values for the CPU/Mem resources, so the BestEffort QoS is not a viable option with Splunk Operator.
With no requests or limits values set for CPU and memory, the QoS class is set to BestEffort. The BestEffort QoS is not recommended for use with Splunk Operator.

### Pod Resources Management

Expand Down
Loading