While attempting to troubleshoot why my enterprise search wouldn't deploy I ended up running into another error. The guide says after running the yaml for deploying enterprise search, to restart kibana. Which from what I've found you do by deleting the kibana pod. When it tried to come back up I kept getting association errors to both elastic and enterprise search.
My configuration is as follows:
K8S private deployment with 5 N1-Standard-4 kubernetes nodes.
I had elastic and kibana fully up and running with 8.6.2. During troubleshooting, I updated to 8.7.0, hoping that would resolve my issue. It did not.
kubectl apply -f https://download.elastic.co/downloads/eck/2.7.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/2.7.0/operator.yaml
<
Elastic Yaml:
kind: Elasticsearch
metadata:
name: main
spec:
version: 8.7.0
nodeSets:
- name: ndpool
config:
node.store.allow_mmap: false
xpack.ml.enabled: true
podTemplate:
metadata:
labels:
pod: es
spec:
containers:
- name: elasticsearch
resources:
requests:
memory: 7.5Gi
cpu: 1
limits:
memory: 10Gi
count: 3
volumeClaimTemplates:
- metadata:
name: elasticsearch-data # Do not change this name unless you set up a volume mount for the data path.
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
storageClassName: standard
secureSettings:
- secretName: gcs_secret_name
http:
service:
spec:
# expose this cluster Service with a LoadBalancer
type: LoadBalancer
ports:
- protocol: TCP
port: 9200
targetPort: 9200
loadBalancerIP: xx.xx.xxx.xxx
Kibana Yaml:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 8.7.0
count: 1
elasticsearchRef:
name: main
enterpriseSearchRef:
name: enterprisesearch
podTemplate:
metadata:
labels:
pod: kb
spec:
containers:
- name: kibana
env:
- name: "NETWORK_HOST"
value: "_site_,_lo_"
ports:
- containerPort: 5601
name: http
- containerPort: 22
name: ssh
# nodeSelector:
# type: frontend
http:
service:
spec:
type: LoadBalancer # default is ClusterIP
loadBalancerIP: 34.xx.xxx.xxx
tls:
certificate:
secretName: kibana-ssl-cert
Enterprise Search Yaml:
apiVersion: enterprisesearch.k8s.elastic.co/v1
kind: EnterpriseSearch
metadata:
name: enterprisesearch
spec:
version: 8.7.0
count: 1
elasticsearchRef:
name: main
config:
ent_search.external_url: https://kibana-dev.ourcompany.com:3002 # https://localhost:3002
ent_search.listen_port: 3002
kibana.host: https://kibana-dev.ourcompany.com:5601
app_search.engine_document_size.limit: 100kb
configRef:
secretName: gcs_secret_name
podTemplate:
spec:
containers:
- name: enterprisesearch
// kubectl get elastic
NAME HEALTH NODES VERSION AGE
kibana.kibana.k8s.elastic.co/kibana 3h26m
NAME HEALTH NODES VERSION PHASE AGE
elasticsearch.elasticsearch.k8s.elastic.co/main green 3 8.7.0 Ready 35d
kubectl describe kibana
$ kubectl describe kb
Name: kibana
Namespace: default
Labels: <none>
Annotations: <none>
API Version: kibana.k8s.elastic.co/v1
Kind: Kibana
Metadata:
Creation Timestamp: 2023-04-03T17:58:51Z
Generation: 1
Managed Fields:
API Version: kibana.k8s.elastic.co/v1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
f:spec:
.:
f:count:
f:elasticsearchRef:
.:
f:name:
f:http:
.:
f:service:
.:
f:spec:
.:
f:loadBalancerIP:
f:type:
f:tls:
.:
f:certificate:
.:
f:secretName:
f:podTemplate:
.:
f:metadata:
.:
f:labels:
.:
f:pod:
f:spec:
.:
f:containers:
f:version:
Manager: kubectl-client-side-apply
Operation: Update
Time: 2023-04-03T17:58:51Z
API Version: kibana.k8s.elastic.co/v1
Fields Type: FieldsV1
fieldsV1:
f:status:
.:
f:associationStatus:
f:count:
f:elasticsearchAssociationStatus:
f:observedGeneration:
Manager: elastic-operator
Operation: Update
Subresource: status
Time: 2023-04-03T17:59:01Z
Resource Version: 30118595
UID: xxxxxxx-xxxx-xxxx-xxxx-xxxxx
Spec:
Count: 1
Elasticsearch Ref:
Name: main
Http:
Service:
Spec:
Load Balancer IP: 34.xx.xxx.xxx
Type: LoadBalancer
Tls:
Certificate:
Secret Name: kibana-ssl-cert
Pod Template:
Metadata:
Labels:
Pod: kb
Spec:
Containers:
Env:
Name: NETWORK_HOST
Value: _site_,_lo_
Name: kibana
Ports:
Container Port: 5601
Name: http
Container Port: 22
Name: ssh
Version: 8.7.0
Status:
Association Status: Pending
Count: 0
Elasticsearch Association Status: Pending
Observed Generation: 1
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning AssociationError 20m kibana-controller Association backend for elasticsearch is not configured