前提・実現したいこと
DiscordのBotをkubectl apply -f deployments.yamlでデプロイしたい。
発生している問題・エラーメッセージ
kubectl apply -f deployments.yaml
root@u1:/home/ubuntu# kubectl get pod NAME READY STATUS RESTARTS AGE discordbot 0/1 Error 1 17s
kubectl describe pod
Name: discordbot-df6f6fb7c-9z6mb Namespace: default Priority: 0 Node: u4/192.168.0.186 Start Time: Sat, 17 Oct 2020 03:01:43 +0900 Labels: pod-template-hash=XXX run=discordbot Annotations: <none> Status: Running IP: 10.244.3.11 IPs: IP: 10.244.3.11 Controlled By: ReplicaSet/discordbot-df6f6fb7c Containers: discordbot: Container ID: docker://XXX Image: XXX Image ID: docker-pullable://XXX Port: <none> Host Port: <none> State: Terminated Reason: Error Exit Code: 1 Started: Sat, 17 Oct 2020 03:01:49 +0900 Finished: Sat, 17 Oct 2020 03:01:51 +0900 Last State: Terminated Reason: Error Exit Code: 1 Started: Sat, 17 Oct 2020 03:01:45 +0900 Finished: Sat, 17 Oct 2020 03:01:47 +0900 Ready: False Restart Count: 1 Environment: <none> Mounts: /var/run/secrets/kubernetes.io/serviceaccount from default-token-7bgg2 (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: default-token-7bgg2: Type: Secret (a volume populated by a Secret) SecretName: default-token-7bgg2 Optional: false QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 9s Successfully assigned default/discordbot-df6f6fb7c-9z6mb to u4 Normal Pulled 3s (x2 over 8s) kubelet, u4 Container image "XXX" already present on machine Normal Created 3s (x2 over 7s) kubelet, u4 Created container discordbot Normal Started 3s (x2 over 7s) kubelet, u4 Started container discordbot Warning BackOff 0s kubelet, u4 Back-off restarting failed container
kubectl logs XXXX
oot@u1:/home/ubuntu# kubectl logs discordbot-df6f6fb7c-9z6mb internal/modules/cjs/loader.js:1187 return process.dlopen(module, path.toNamespacedPath(filename)); ^ Error: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node) at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Module.require (internal/modules/cjs/loader.js:1025:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (/node_modules/sqlite3/lib/sqlite3-binding.js:4:15) at Module._compile (internal/modules/cjs/loader.js:1137:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14)
該当のソースコード
Dockerfile
1FROM node:lts 2 3WORKDIR / 4 5COPY package.json ./ 6RUN npm i 7RUN npm install keyv @keyv/sqlite 8 9RUN apt-get update || : && apt-get install python -y 10RUN apt-get install ffmpeg -y 11RUN apt-get install libc6 -y ※ここはGlibc2.29が見つからないと出たから追加 12 13COPY . . 14 15CMD [ "node", "index.js" ]
Deployments.yaml
apiVersion: apps/v1 kind: Deployment metadata: labels: run: discordbot name: discordbot spec: replicas: 1 selector: matchLabels: run: discordbot template: metadata: creationTimestamp: null labels: run: discordbot spec: containers: - image: XXX/XXX:XXX name: discordbot imagePullSecrets: - name: regcred
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
node v12.18.3
npm 6.14.8
Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-1021-raspi aarch64)
Docker version 19.03.13, build 4484c46
kubeadm version: &version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:24:31Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/arm64"}
root@e15b9b712ff9:/# ldd --version
ldd (Debian GLIBC 2.24-11+deb9u4) 2.24
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
回答1件
あなたの回答
tips
プレビュー