Skip to content

Instantly share code, notes, and snippets.

@holms holms/bash
Created Nov 6, 2019

Embed
What would you like to do?
Name: elasticsearch-master-0
Namespace: elasticsearch
Priority: 0
Node: elasticsearch-g5dr/10.135.119.86
Start Time: Wed, 06 Nov 2019 04:21:49 +0200
Labels: app=elasticsearch-master
chart=elasticsearch
controller-revision-hash=elasticsearch-master-76c7685fb8
heritage=Tiller
release=elasticsearch
statefulset.kubernetes.io/pod-name=elasticsearch-master-0
Annotations: <none>
Status: Pending
IP: 10.244.4.175
IPs: <none>
Controlled By: StatefulSet/elasticsearch-master
Init Containers:
configure-sysctl:
Container ID: docker://4e1198dce13c4c70513df6167577ce2721eefde2dcf820598908579f4e9b14db
Image: docker.elastic.co/elasticsearch/elasticsearch:7.4.1
Image ID: docker-pullable://docker.elastic.co/elasticsearch/elasticsearch@sha256:88c2ee30115f378b8f7e66662ec26bca0c8778c69096bee6b161128ce833585f
Port: <none>
Host Port: <none>
Command:
sysctl
-w
vm.max_map_count=262144
State: Terminated
Reason: Completed
Exit Code: 0
Started: Wed, 06 Nov 2019 04:21:59 +0200
Finished: Wed, 06 Nov 2019 04:21:59 +0200
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-nwlnz (ro)
create:
Container ID: docker://a8680512172a8e010e1f1e8c3c5395e0fd434bc5ba12a2a022ec227f7b62b7ba
Image: busybox:1.28
Image ID: docker-pullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47
Port: <none>
Host Port: <none>
Command:
mkdir
/usr/share/elasticsearch/data/nodes/
State: Terminated
Reason: Completed
Exit Code: 0
Started: Wed, 06 Nov 2019 04:22:00 +0200
Finished: Wed, 06 Nov 2019 04:22:00 +0200
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/usr/share/elasticsearch/data from elasticsearch-master (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-nwlnz (ro)
file-permissions:
Container ID: docker://202ad2e7783984b1243f900a1add839e10d8b0687a4717015b548bb632158a67
Image: busybox:1.28
Image ID: docker-pullable://busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47
Port: <none>
Host Port: <none>
Command:
chown
-R
1000:1000
/usr/share/elasticsearch/
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 06 Nov 2019 04:27:43 +0200
Finished: Wed, 06 Nov 2019 04:27:43 +0200
Ready: False
Restart Count: 6
Environment: <none>
Mounts:
/usr/share/elasticsearch/data from elasticsearch-master (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-nwlnz (ro)
Containers:
elasticsearch:
Container ID:
Image: docker.elastic.co/elasticsearch/elasticsearch:7.4.1
Image ID:
Ports: 9200/TCP, 9300/TCP
Host Ports: 0/TCP, 0/TCP
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Limits:
cpu: 1
memory: 512M
Requests:
cpu: 100m
memory: 512M
Readiness: exec [sh -c #!/usr/bin/env bash -e
# If the node is starting up wait for the cluster to be ready (request params: 'wait_for_status=green&timeout=1s' )
# Once it has started only check that the node itself is responding
START_FILE=/tmp/.es_start_file
http () {
local path="${1}"
if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then
BASIC_AUTH="-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}"
else
BASIC_AUTH=''
fi
curl -XGET -s -k --fail ${BASIC_AUTH} http://127.0.0.1:9200${path}
}
if [ -f "${START_FILE}" ]; then
echo 'Elasticsearch is already running, lets check the node is healthy'
http "/"
else
echo 'Waiting for elasticsearch cluster to become cluster to be ready (request params: "wait_for_status=green&timeout=1s" )'
if http "/_cluster/health?wait_for_status=green&timeout=1s" ; then
touch ${START_FILE}
exit 0
else
echo 'Cluster is not yet ready (request params: "wait_for_status=green&timeout=1s" )'
exit 1
fi
fi
] delay=10s timeout=5s period=10s #success=3 #failure=3
Environment:
node.name: elasticsearch-master-0 (v1:metadata.name)
cluster.initial_master_nodes: elasticsearch-master-0,elasticsearch-master-1,elasticsearch-master-2,
discovery.seed_hosts: elasticsearch-master-headless
cluster.name: elasticsearch
network.host: 0.0.0.0
ES_JAVA_OPTS: -Xmx128m -Xms128m
node.data: true
node.ingest: true
node.master: true
Mounts:
/usr/share/elasticsearch/data from elasticsearch-master (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-nwlnz (ro)
Conditions:
Type Status
Initialized False
Ready False
ContainersReady False
PodScheduled True
Volumes:
elasticsearch-master:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: elasticsearch-master-elasticsearch-master-0
ReadOnly: false
default-token-nwlnz:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-nwlnz
Optional: false
QoS Class: Burstable
Node-Selectors: doks.digitalocean.com/node-pool=elasticsearch
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 10m (x3 over 10m) default-scheduler pod has unbound immediate PersistentVolumeClaims (repeated 3 times)
Normal Scheduled 10m default-scheduler Successfully assigned elasticsearch/elasticsearch-master-0 to elasticsearch-g5dr
Normal SuccessfulAttachVolume 10m attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-4ee6703b-6565-413e-81c5-e50a307a02b7"
Normal Pulled 10m kubelet, elasticsearch-g5dr Container image "docker.elastic.co/elasticsearch/elasticsearch:7.4.1" already present on machine
Normal Created 10m kubelet, elasticsearch-g5dr Created container configure-sysctl
Normal Started 10m kubelet, elasticsearch-g5dr Started container configure-sysctl
Normal Pulled 10m kubelet, elasticsearch-g5dr Container image "busybox:1.28" already present on machine
Normal Created 10m kubelet, elasticsearch-g5dr Created container create
Normal Started 10m kubelet, elasticsearch-g5dr Started container create
Normal Pulled 9m17s (x4 over 10m) kubelet, elasticsearch-g5dr Container image "busybox:1.28" already present on machine
Normal Created 9m17s (x4 over 10m) kubelet, elasticsearch-g5dr Created container file-permissions
Normal Started 9m17s (x4 over 10m) kubelet, elasticsearch-g5dr Started container file-permissions
Warning BackOff 4m57s (x26 over 10m) kubelet, elasticsearch-g5dr Back-off restarting failed container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.