Skip to content

Commit 3f5cd59

Browse files
authored
Merge pull request #1536 from splunk/CSPL-3851-nginx-blank-page
CSPL-3851 Session Stickiness for Ingress
2 parents db2c02a + 349ce02 commit 3f5cd59

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

docs/Ingress.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ For Ingress we recommend using separate ports for encrypted and non-encrypted tr
4444
#### Indexer Discovery is not supported
4545
Indexer Discovery is not supported on a Kubernetes cluster. Instead, the Ingress controllers will be responsible to connect forwarders to peer nodes in Indexer clusters.
4646

47+
#### Sticky Sessions
48+
When configuring the ingress configuration, it is important to ensure that the session is sticky to the Splunk specific instance. This is required for Splunk to work properly since otherwise, a blank page might be experienced when trying to access the Splunk instances. The examples below show how to configure this using Istio and Nginx Ingress controllers.
49+
4750

4851
## Configuring Ingress Using Istio
4952

@@ -451,6 +454,9 @@ Note that the Virtual Service no longer handles TLS since it has been terminated
451454

452455
##### Documentation tested on Istio v1.8 and Kubernetes v1.17
453456

457+
### Sticky Sessions
458+
Follow [Istio Sticky Sessions Documentation](https://istio.io/latest/docs/reference/config/networking/destination-rule/#LoadBalancerSettings) to learn how to configure session stickiness for Istio.
459+
454460
## Note on Service Mesh and Istio
455461

456462
Istio is a popular choice for its Service Mesh capabilities. However, Service Mesh for Splunk instances are only supported on Istio v1.8 and above, along with Kubernetes v1.19 and above. At the time of this documentation, neither Amazon AWS nor Google Cloud have updated their stack to these versions.
@@ -667,6 +673,9 @@ spec:
667673

668674
##### Documentation tested on Ingress Nginx v1.19.4 and Kubernetes v1.17
669675

676+
### Sticky Sessions
677+
Follow [Ingress Nginx Sticky Sessions Documentation](https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/) to learn how to configure session stickiness for the Ingress Nginx controller.
678+
670679
## Configuring Ingress Using NGINX Ingress Controller (Nginxinc)
671680

672681
The Nginx Ingress Controller is an open source version of the F5 product. Please review their documentation below for more details.
@@ -863,6 +872,10 @@ spec:
863872

864873
##### Documentation tested on Nginx Ingress Controller v1.9.0 and Kubernetes v1.18
865874

875+
### Sticky Sessions
876+
Follow [Nginx Ingress Controller Sticky Sessions Documentation](https://github.com/nginx/kubernetes-ingress/tree/main/examples/ingress-resources/session-persistence) to learn how to configure session stickiness for Nginx Ingress Controller.
877+
878+
866879
## Using Let's Encrypt to manage TLS certificates
867880

868881
If you are using [cert-manager](https://docs.cert-manager.io/en/latest/getting-started/) with [Let’s Encrypt](https://letsencrypt.org/) to manage your TLS certificates in Kubernetes, this example Ingress object can be used to enable secure (TLS) access to all Splunk components from outside of your Kubernetes cluster:

test/deploy-eks-cluster.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function deleteCluster() {
2626
rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF)}')
2727

2828
# Detach role policies
29-
role_attached_policies=$(aws iam list-attached-role-policies --role-name $rolename --query 'AttachedPolicies[*].PolicyArn' --output text)
29+
role_attached_policies=$(aws iam list-attached-role-policies --role-name ${rolename} --query 'AttachedPolicies[*].PolicyArn' --output text)
3030
for policy_arn in ${role_attached_policies}; do
3131
aws iam detach-role-policy --role-name ${rolename} --policy-arn ${policy_arn}
3232
done
@@ -122,8 +122,8 @@ function createCluster() {
122122
rolename=$(echo ${TEST_CLUSTER_NAME} | awk -F- '{print "EBS_" $(NF-1) "_" $(NF)}')
123123
aws iam create-role --role-name ${rolename} --assume-role-policy-document file://aws-ebs-csi-driver-trust-policy.json --description "irsa role for ${TEST_CLUSTER_NAME}"
124124
aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy --role-name ${rolename}
125-
kubectl annotate serviceaccount -n $namespace $service_account eks.amazonaws.com/role-arn=arn:aws:iam::$account_id:role/${rolename}
126-
eksctl create addon --name aws-ebs-csi-driver --cluster ${TEST_CLUSTER_NAME} --service-account-role-arn arn:aws:iam::$account_id:role/${rolename} --force
125+
kubectl annotate serviceaccount -n ${namespace} ${service_account} eks.amazonaws.com/role-arn=arn:aws:iam::${account_id}:role/${rolename}
126+
eksctl create addon --name aws-ebs-csi-driver --cluster ${TEST_CLUSTER_NAME} --service-account-role-arn arn:aws:iam::${account_id}:role/${rolename} --force
127127
eksctl utils update-cluster-logging --cluster ${TEST_CLUSTER_NAME}
128128
# CSPL-2887 - Patch the default storage class to gp2
129129
kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

0 commit comments

Comments
 (0)