I'm trying to deploy the Vanilla MineCraft Server from stable/minecraft using Helm on Kubernetes 1.14 running on AWS EKS but I am consitently either getting CrashLoopBackOff or Liveness Probe Failures. This seems strange to me as I'm deploying the chart as specified per the documentation:
helm install --name mine-release --set minecraftServer.eula=TRUE --namespace=mine-release stable/minecraft
Already Attempted Debugging:
- Tried decreasing and increasing memory
helm install --name mine-release --set resources.requests.memory="1024Mi" --set minecraftServer.memory="1024M" --set minecraftServer.eula=TRUE --namespace=mine-release stable/minecraft - Tried viewing logs through
kubectl logs mine-release-minecraft-56f9c8588-xn9pv --namespace mine-releasebut this error is allways appearing
Error from server: Get https://10.0.143.216:10250/containerLogs/mine-release/mine-release-minecraft-56f9c8588-xn9pv/mine-release-minecraft: dial tcp 10.0.143.216:10250: i/o timeout
To give more context the kubectl describe pods mine-release-minecraft-56f9c8588-xn9pv --namespace mine-release output for pod description and events are below:
Name: mine-release-minecraft-56f9c8588-xn9pv
Namespace: mine-release
Priority: 0
PriorityClassName: <none>
Node: ip-10-0-143-216.ap-southeast-2.compute.internal/10.0.143.216
Start Time: Fri, 11 Oct 2019 08:48:34 +1100
Labels: app=mine-release-minecraft
pod-template-hash=56f9c8588
Annotations: kubernetes.io/psp: eks.privileged
Status: Running
IP: 10.0.187.192
Controlled By: ReplicaSet/mine-release-minecraft-56f9c8588
Containers:
mine-release-minecraft:
Container ID: docker://893f622e1129937fab38dc902e25e95ac86c2058da75337184f105848fef773f
Image: itzg/minecraft-server:latest
Image ID: docker-pullable://itzg/minecraft-server@sha256:00f592eb6660682f327770d639cf10692b9617fa8b9a764b9f991c401e325105
Port: 25565/TCP
Host Port: 0/TCP
State: Running
Started: Fri, 11 Oct 2019 08:50:56 +1100
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Fri, 11 Oct 2019 08:50:03 +1100
Finished: Fri, 11 Oct 2019 08:50:53 +1100
Ready: False
Restart Count: 2
Requests:
cpu: 500m
memory: 1Gi
Liveness: exec [mcstatus localhost:25565 status] delay=30s timeout=1s period=5s #success=1 #failure=3
Readiness: exec [mcstatus localhost:25565 status] delay=30s timeout=1s period=5s #success=1 #failure=3
Environment:
EULA: true
TYPE: VANILLA
VERSION: 1.14.4
DIFFICULTY: easy
WHITELIST:
OPS:
ICON:
MAX_PLAYERS: 20
MAX_WORLD_SIZE: 10000
ALLOW_NETHER: true
ANNOUNCE_PLAYER_ACHIEVEMENTS: true
ENABLE_COMMAND_BLOCK: true
FORCE_gameMode: false
GENERATE_STRUCTURES: true
HARDCORE: false
MAX_BUILD_HEIGHT: 256
MAX_TICK_TIME: 60000
SPAWN_ANIMALS: true
SPAWN_MONSTERS: true
SPAWN_NPCS: true
VIEW_DISTANCE: 10
SEED:
MODE: survival
MOTD: Welcome to Minecraft on Kubernetes!
PVP: false
LEVEL_TYPE: DEFAULT
GENERATOR_SETTINGS:
LEVEL: world
ONLINE_MODE: true
MEMORY: 512M
JVM_OPTS:
JVM_XX_OPTS:
Mounts:
/data from datadir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-j8zql (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
datadir:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mine-release-minecraft-datadir
ReadOnly: false
default-token-j8zql:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-j8zql
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m25s default-scheduler pod has unbound immediate PersistentVolumeClaims (repeated 3 times)
Normal Scheduled 2m24s default-scheduler Successfully assigned mine-release/mine-release-minecraft-56f9c8588-xn9pv to ip-10-0-143-216.ap-southeast-2.compute.internal
Warning FailedAttachVolume 2m22s (x3 over 2m23s) attachdetach-controller AttachVolume.Attach failed for volume "pvc-b48ba754-eba7-11e9-b609-02ed13ff0a10" : "Error attaching EBS volume \"vol-08b29bb4eeca4df56\"" to instance "i-00ae1f5b96eed8e6a" since volume is in "creating" state
Normal SuccessfulAttachVolume 2m18s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-b48ba754-eba7-11e9-b609-02ed13ff0a10"
Warning Unhealthy 60s kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Readiness probe failed: Traceback (most recent call last):
File "/usr/bin/mcstatus", line 11, in <module>
sys.exit(cli())
File "/usr/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/mcstatus/scripts/mcstatus.py", line 58, in status
response = server.status()
File "/usr/lib/python2.7/site-packages/mcstatus/server.py", line 49, in status
connection = TCPSocketConnection((self.host, self.port))
File "/usr/lib/python2.7/site-packages/mcstatus/protocol/connection.py", line 129, in __init__
self.socket = socket.create_connection(addr, timeout=timeout)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
socket.error: [Errno 99] Address not available
Normal Pulling 58s (x2 over 2m14s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal pulling image "itzg/minecraft-server:latest"
Normal Killing 58s kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Killing container with id docker://mine-release-minecraft:Container failed liveness probe.. Container will be killed and recreated.
Normal Started 55s (x2 over 2m11s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Started container
Normal Pulled 55s (x2 over 2m11s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Successfully pulled image "itzg/minecraft-server:latest"
Normal Created 55s (x2 over 2m11s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Created container
Warning Unhealthy 25s (x2 over 100s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Readiness probe failed: Traceback (most recent call last):
File "/usr/bin/mcstatus", line 11, in <module>
sys.exit(cli())
File "/usr/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/mcstatus/scripts/mcstatus.py", line 58, in status
response = server.status()
File "/usr/lib/python2.7/site-packages/mcstatus/server.py", line 61, in status
raise exception
socket.error: [Errno 104] Connection reset by peer
Warning Unhealthy 20s (x8 over 95s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Readiness probe failed:
Warning Unhealthy 17s (x5 over 97s) kubelet, ip-10-0-143-216.ap-southeast-2.compute.internal Liveness probe failed:
I bit more about my Kubernetes Setup:
Kubernetes version 1.14 and nodes running on m5.larges