gpt4 book ai didi

ubuntu - 在本地系统上的 kubernetes 上设置工具时出错

转载 作者:行者123 更新时间:2023-12-04 19:14:51 30 4
gpt4 key购买 nike

我刚刚开始使用 Kubernetes。我正在关注 pipelineIO 提供的 wiki并设置一切。我已经成功设置了 kubernetes,但是我需要在集群上运行的其他工具并没有那么成功。这是他们的 bash 脚本:

#!/bin/sh

echo '...MySql...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/sql.ml/mysql-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/sql.ml/mysql-svc.yaml

echo '...HDFS...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/hdfs.ml/hdfs-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/hdfs.ml/hdfs-svc.yaml

echo '...Hive Metastore...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/metastore.ml/metastore-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/metastore.ml/metastore-svc.yaml

echo '...Spark - Master...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/apachespark.ml/spark-master-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/apachespark.ml/spark-master-svc.yaml

echo '...Spark - Worker...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/apachespark.ml/spark-worker-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/apachespark.ml/spark-worker-svc.yaml

echo '...JupyterHub...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/jupyterhub.ml/jupyterhub-rc.yaml
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/jupyterhub.ml/jupyterhub-svc.yaml

echo '...Dashboard - Weavescope...'
kubectl create -f https://raw.githubusercontent.com/fluxcapacitor/pipeline/master/dashboard.ml/weavescope/weavescope.yaml
kubectl describe svc weavescope-app

其中,只有 weavescope 已成功设置,其余显示错误,如图所示:

enter image description here

我不明白出了什么问题以及如何解决它。我无法通过在线搜索来解决问题。我不认为 kubernetes 实际下载了任何 docker 图像,但我不知道这是否是问题所在。请帮忙。

ps:如果有任何要求:
操作系统:Ubuntu 16.04
处理器:英特尔 i5 6200
显卡:英伟达 GeForce 940MX

编辑1:
运行查询 kubectl describe node minikube 后,我没有找到有关 findSelector 的任何信息,这是输出:
Name:           minikube
Role:
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=minikube
Taints: <none>
CreationTimestamp: Mon, 30 Jan 2017 02:16:46 +0530
Phase:
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
OutOfDisk False Tue, 31 Jan 2017 02:55:10 +0530 Mon, 30 Jan 2017 02:16:46 +0530 KubeletHasSufficientDisk kubelet has sufficient disk space available
MemoryPressure False Tue, 31 Jan 2017 02:55:10 +0530 Mon, 30 Jan 2017 02:16:46 +0530 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Tue, 31 Jan 2017 02:55:10 +0530 Mon, 30 Jan 2017 02:16:46 +0530 KubeletHasNoDiskPressure kubelet has no disk pressure
Ready True Tue, 31 Jan 2017 02:55:10 +0530 Mon, 30 Jan 2017 02:16:47 +0530 KubeletReady kubelet is posting ready status
Addresses: 192.168.99.100,192.168.99.100,minikube
Capacity:
alpha.kubernetes.io/nvidia-gpu: 0
cpu: 2
memory: 2049008Ki
pods: 110
Allocatable:
alpha.kubernetes.io/nvidia-gpu: 0
cpu: 2
memory: 2049008Ki
pods: 110
System Info:
Machine ID: 112c60c791a944ff93bbc446e8c28598
System UUID: E0D8970E-F2E2-4503-A282-756ADA83592A
Boot ID: 9305d5d2-11e9-411a-b335-b5aa3d59432e
Kernel Version: 4.7.2
OS Image: Buildroot 2016.08
Operating System: linux
Architecture: amd64
Container Runtime Version: docker://1.11.1
Kubelet Version: v1.5.1
Kube-Proxy Version: v1.5.1
ExternalID: minikube
Non-terminated Pods: (4 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits
--------- ---- ------------ ---------- --------------- -------------
default weavescope-probe-zk779 50m (2%) 50m (2%) 0 (0%) 0 (0%)
kube-system kube-addon-manager-minikube 5m (0%) 0 (0%) 50Mi (2%) 0 (0%)
kube-system kube-dns-v20-75pq6 110m (5%) 0 (0%) 120Mi (5%)220Mi (10%)
kube-system kubernetes-dashboard-5q16v 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.
CPU Requests CPU Limits Memory Requests Memory Limits
------------ ---------- --------------- -------------
165m (8%) 50m (2%) 170Mi (8%) 220Mi (10%)
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
17m 17m 1 {kube-proxy minikube} Normal Starting Starting kube-proxy.
17m 17m 1 {kubelet minikube} Normal Starting Starting kubelet.
17m 17m 1 {kubelet minikube} Warning ImageGCFailed unable to find data for container /
17m 17m 1 {kubelet minikube} Normal NodeHasSufficientDisk Node minikube status is now: NodeHasSufficientDisk
17m 17m 1 {kubelet minikube} Normal NodeHasSufficientMemory Node minikube status is now: NodeHasSufficientMemory
17m 17m 1 {kubelet minikube} Normal NodeHasNoDiskPressure Node minikube status is now: NodeHasNoDiskPressure
17m 17m 1 {kubelet minikube} Warning Rebooted Node minikube has been rebooted, boot id: 9305d5d2-11e9-411a-b335-b5aa3d59432e

编辑2:
cortana@cortana:~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hdfs-gv0ss 0/1 Completed 0 8h
jupyterhub-master-tt81t 0/1 ContainerCreating 0 8h
metastore-1-2-1-4qdnz 0/1 ContainerCreating 0 8h
mysql-master-8ksch 0/1 Completed 0 8h
spark-master-2-0-1-r8g9j 1/1 Running 1 8h
spark-worker-2-0-1-9v45w 0/1 Completed 0 8h
weavescope-app-lkl15 0/1 ContainerCreating 0 8h
weavescope-probe-s5zsd 0/1 ContainerCreating 0 6h

pod 已完成,但除了 Spark 一号外没有运行。我怎样才能运行它们?

最佳答案

问题是您正在部署的 ReplicationControllers 有一个节点选择器:

  nodeSelector:
training: "true"

节点选择器会影响 Pod 的调度。在这种情况下,调度程序正在寻找标签为 training 的节点。 , 值为 true .

我怀疑您没有具有此标签的节点。要查看给定节点的标签,您可以使用 kubectl describe node $NODE_NAME .更多信息 node selectors here.

编辑:从 kubectl 的输出中可以看出,您的节点没有标签 training=true .该节点具有标签:
Name:           minikube
Role:
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=minikube

因此,没有合适的节点来部署您的工作负载。如果要标注节点,可以 kubectl label node minikube training=true .

关于ubuntu - 在本地系统上的 kubernetes 上设置工具时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41925963/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com