【问题标题】:Unable to run the thingsboard from premise minikube无法从前提 minikube 运行 thingsboard
【发布时间】:2021-03-03 20:08:14
【问题描述】:

我已经按照下面的链接,但我得到的错误是:

k@krishna-Lenovo-G50-70:~/testExperimentsOne$ git clone https://github.com/thingsboard/thingsboard-pe-k8s.git
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ cat .env

# Can be either basic (with single instance of Zookeeper, Kafka and Redis) or high-availability (with Zookeeper, Kafka and Redis in cluster modes).
# According to the deployment type corresponding kubernetes resources will be deployed (see content of the directories ./basic and ./high-availability for details).
DEPLOYMENT_TYPE=basic
PLATFORM=
# Database used by ThingsBoard, can be either postgres (PostgreSQL) or hybrid (PostgreSQL for entities database and Cassandra for timeseries database).
# According to the database type corresponding kubernetes resources will be deployed (see postgres.yml, cassandra.yml for details).
DATABASE=postgres
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ nano .env

# Can be either basic (with single instance of Zookeeper, Kafka and Redis) or high-availability (with Zookeeper, Kafka and Redis in cluster modes).
# According to the deployment type corresponding kubernetes resources will be deployed (see content of the directories ./basic and ./high-availability for details).
DEPLOYMENT_TYPE=basic
PLATFORM=minikiube
# Database used by ThingsBoard, can be either postgres (PostgreSQL) or hybrid (PostgreSQL for entities database and Cassandra for timeseries database).
# According to the database type corresponding kubernetes resources will be deployed (see postgres.yml, cassandra.yml for details).
DATABASE=postgres
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ ./k8s-install-tb.sh --loadDemo
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ kubectl delete deployment --all
deployment.apps "postgres" deleted
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ minikube delete
????  Deleting "minikube" in virtualbox ...
????  Removed all traces of the "minikube" cluster.
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ minikube start
????  minikube v1.15.1 on Ubuntu 16.04
✨  Automatically selected the virtualbox driver
????  Starting control plane node minikube in cluster minikube
????  Creating virtualbox VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
????  Preparing Kubernetes v1.19.4 on Docker 19.03.13 ...
????  Verifying Kubernetes components...
????  Enabled addons: storage-provisioner, default-storageclass
????  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ ./k8s-install-tb.sh --loadDemo
namespace/thingsboard created
Context "minikube" modified.
persistentvolumeclaim/tb-node-license-pv-claim created
persistentvolumeclaim/postgres-pv-claim created
deployment.apps/postgres created
service/tb-database created
configmap/tb-node-db-config created
Waiting for deployment "postgres" rollout to finish: 0 of 1 updated replicas are available...
deployment "postgres" successfully rolled out
configmap/tb-node-config created
pod/tb-db-setup created
error: timed out waiting for the condition on pods/tb-db-setup
pod "tb-db-setup" deleted

如何成功安装并在浏览器中查看如下链接所示。

https://thingsboard.io/docs/user-guide/install/cluster/minikube-cluster-setup/

@PjoterS 我错过了执行 Enable ingress 插件,正如您告诉我的“检查您启用了 minikube 插件列表的插件”,我执行了以下命令,如链接 https://thingsboard.io/docs/user-guide/install/cluster/minikube-cluster-setup/

第 5 步。运行 执行以下命令运行安装:

$ ./k8s-install-tb.sh --loadDemo

地点:

--loadDemo - 可选参数。是否加载额外的演示数据。 执行以下命令部署第三方资源:

$ ./k8s-deploy-thirdparty.sh

如果您是第一次在高可用性 DEPLOYMENT_TYPE 中运行 ThingsBoard 或未配置 Redis 集群,请在提示时输入“yes”。

执行以下命令部署ThingsBoard资源:

$ ./k8s-deploy-resources.sh

一段时间后,所有资源都将成功启动,您可以在浏览器中打开 http://{your-cluster-ip}(例如http://192.168.99.101)。您可以使用以下命令查看您的集群 IP:

$ minikube ip

您应该会看到 ThingsBoard 登录页面。

发现:

k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ minikube addons enable ingress
????  Verifying ingress addon...
????  The 'ingress' addon is enabled
k@krishna-Lenovo-G50-70:~/testExperimentsOne/thingsboard-pe-k8s$ ./k8s-install-tb.sh --loadDemo
namespace/thingsboard created
Context "minikube" modified.
persistentvolumeclaim/tb-node-license-pv-claim created
persistentvolumeclaim/postgres-pv-claim created
deployment.apps/postgres created
service/tb-database created
configmap/tb-node-db-config created
Waiting for deployment "postgres" rollout to finish: 0 of 1 updated replicas are available...
deployment "postgres" successfully rolled out
configmap/tb-node-config created
pod/tb-db-setup created
error: timed out waiting for the condition on pods/tb-db-setup
pod "tb-db-setup" deleted

执行此命令时出现超时错误 $./k8s-install-tb.sh --loadDemo

【问题讨论】:

  • 你能具体说明你有什么错误吗?在第一条评论中,您正在克隆 rebo,而在第二条评论中,您正在检查 .env。稍后你启动 Minikube,它看起来没问题。既然已经描述了所有内容,那么您究竟需要什么帮助?在 minikube 中,您需要使用 LoadBalancerNodePort (在教程中使用 NodePort)公开服务以在集群外部访问。检查你启用了哪些插件minikube addons list
  • @PjoterS 请出现错误 - 上面的“等待 pods/tb-db-setup 的条件超时”。
  • 您能否提供kubectl get svc -A 的输出以及有关tb-db-setup pod 的任何其他信息? kubectl describekubectl logskubectl get events | grep tb-db-setup?

标签: postgresql kubernetes minikube thingsboard


【解决方案1】:

我看到您的 .env 文件输出中有错字,

平台=minikiube

应该是

PLATFORM=minikube

(注意“kiube”中多余的 i)

【讨论】:

    猜你喜欢
    • 2017-12-27
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 2020-01-08
    • 2022-01-16
    • 2022-07-20
    • 2021-07-24
    • 1970-01-01
    相关资源
    最近更新 更多