- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试在 DigitalOcean 的 Kubernetes 中运行 Redis 集群。作为一个 poc,我只是尝试运行我在网上找到的一个示例 ( https://github.com/sanderploegsma/redis-cluster/blob/master/redis-cluster.yml ),它能够在使用 minikube 在本地运行时适本地启动 pod。
但是,在Digital Ocean上运行时,总是报如下错误:
Warning FailedScheduling 3s (x8 over 17s) default-scheduler pod has unbound immediate PersistentVolumeClaims (repeated 4 times)
鉴于我没有改变任何东西,我不确定为什么这行不通。有人有什么建议吗?
编辑:一些额外的信息
$ kubectl describe pvc
Name: data-redis-cluster-0
Namespace: default
StorageClass:
Status: Pending
Volume:
Labels: app=redis-cluster
Annotations: <none>
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 3m19s (x3420 over 14h) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Mounted By: <none>
编辑:设置默认存储类部分解决了问题!但是,该节点现在无法找到要绑定(bind)的可用卷:
kubectl 描述 pvc:
Name: data-redis-cluster-0
Namespace: default
StorageClass: local-storage
Status: Pending
Volume:
Labels: app=redis-cluster
Annotations: <none>
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal WaitForFirstConsumer 12m (x9 over 13m) persistentvolume-controller waiting for first consumer to be created before binding
Normal WaitForFirstConsumer 3m19s (x26 over 9m34s) persistentvolume-controller waiting for first consumer to be created before binding
kubectl 描述 pod redis-cluster-0
....
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 16m (x25 over 17m) default-scheduler 0/5 nodes are available: 1 node(s) had taints that the pod didn't tolerate, 4 node(s) didn't find available persistent volumes to bind.
kubectl 描述 sc
Name: local-storage
IsDefaultClass: Yes
Annotations: storageclass.kubernetes.io/is-default-class=true
Provisioner: kubernetes.io/no-provisioner
Parameters: <none>
AllowVolumeExpansion: <unset>
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: WaitForFirstConsumer
Events: <none>
kubernetes 管理器 pod 日志:
I1028 15:30:56.154131 1 event.go:221] Event(v1.ObjectReference{Kind:"StatefulSet", Namespace:"default", Name:"redis-cluster", UID:"7528483e-dac6-11e8-871f-2e55450d570e", APIVersion:"apps/v1", ResourceVersion:"2588806", FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' create Claim data-redis-cluster-0 Pod redis-cluster-0 in StatefulSet redis-cluster success
I1028 15:30:56.166649 1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"data-redis-cluster-0", UID:"76746506-dac6-11e8-871f-2e55450d570e", APIVersion:"v1", ResourceVersion:"2588816", FieldPath:""}): type: 'Normal' reason: 'WaitForFirstConsumer' waiting for first consumer to be created before binding
I1028 15:30:56.220464 1 event.go:221] Event(v1.ObjectReference{Kind:"StatefulSet", Namespace:"default", Name:"redis-cluster", UID:"7528483e-dac6-11e8-871f-2e55450d570e", APIVersion:"apps/v1", ResourceVersion:"2588806", FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' create Pod redis-cluster-0 in StatefulSet redis-cluster successful
I1028 15:30:57.004631 1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"data-redis-cluster-0", UID:"76746506-dac6-11e8-871f-2e55450d570e", APIVersion:"v1", ResourceVersion:"2588825", FieldPath:""}): type: 'Normal' reason: 'WaitForFirstConsumer' waiting for first consumer to be created before binding
最佳答案
这个:
no storage class is set
kubectl describe sc
的空输出意味着没有存储类。
我建议安装 CSI-driver对于 digital ocean 。这将使用 Kubernetes CSI 接口(interface)创建一个 do-block-storage
类。
另一种选择是使用本地存储。使用 local存储类:
$ cat <<EOF
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
EOF | kubectl apply -f -
然后对于任何一种情况,如果您没有在 PVC 中指定 storageClassName
,您可能需要将其设置为默认存储类:
$ kubectl patch storageclass local-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
或
$ kubectl patch storageclass do-block-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
关于redis - DigitalOcean pod 具有未绑定(bind)的即时 PersistentVolumeClaims,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52975887/
我在 digitalocean 托管中有一个站点,但从该站点发送电子邮件时遇到了一些问题。 我的网站建立在 wordpress 上,我正在尝试通过电子邮件提交申请。它在我的本地主机和我的服务器上运行
DigitalOcean 的浮动 IP 是一种保留与您的计算资源无关的公共 IP 地址的方式。它们提供了一种在您的资产之间快速重新路由流量的方法,而无需等待 DNS 更改生效。 诸如 Droplets
我正在在线学习本教程 https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.
我有一个托管 Ubuntu 服务器的 DigitalOcean droplot,该服务器拒绝连接到所有相关域。我使用 ServerPilot 托管 WordPress 网站,该网站现在向我的服务器 I
我正在 DigitalOcean 上使用 CoreOs 和 Kubernetes 构建一个容器集群,我已经看到为了向世界公开 Pod,您必须创建一个类型为:LoadBalancer 的服务。我认为这是
DigitalOcean有很多one-click apps可用的。它们帮助您使用预安装的软件创建一个 Droplet。但我还没有找到任何关于它们的技术文档。 具体来说: 谁维护这些应用程序? (例如,
我使用 Kubeadm 和 digitalocean 上的 3 个 Droplet 创建了一个 Kubernetes 集群。 ...在为我正在处理的节点 mongodb pod 创建持久卷声明时,使用
我完成了这个 Digital Ocean 教程: https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomc
我正在使用 DigitalOcean 为我的网站提供静态文件。我使用 Django 和 Postgres 作为数据库。我用 DigitalOcean Droplet 部署了我的网站,在 Digital
我在 centos 上使用 digitalocean 脚本,但它似乎不起作用。 https://www.digitalocean.com/community/tutorials/how-to-set-
我在 Digital Ocean 服务器上运行的 Magento 商店有问题。 这是我的液滴配置: 2GB Ram | 40GB SSD Disk | New York 2 | Ubuntu Ubun
DigitalOcean 的Container Registry为您在云中提供了一个私有空间来存储和分发您的 Docker 映像。除了提供图像存储库外,该服务还集成到 DigitalOcean 的其他
我尝试运行 apt-get install httpd安装 Apache HTTP 服务器,但出现以下错误: Package httpd is a virtual package provid
我尝试在 .bashrc 中设置环境变量, .profile , .bash_profile , /etc/environment以及 /etc/defaults/nginx但没有任何效果。仅限 /e
我有一个域 example.com,并且我想将一个子域 test.example.com 指向我的一个 droplets,而不必将域移动到 digital ocean 名称服务器。这可能吗?如何? 最
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 3年前关闭。 Improve thi
我正在尝试部署我的 jhipster应用程序在 DigitalOcean . 我已经创建了一个 Droplet,使用 ssh 连接到它并从 git 克隆了 jhipster 应用程序.现在我在服务器上
我在 Github 中创建了一个基于 Meteor 平台的新应用程序存储库。但是,我在将应用程序部署到我的 DigitalOcean 液滴时遇到了很大的困难。我正在尝试将我的 Github 存储库连接
我目前正在将 Digital Ocean 与 Amazon S3 SDK 结合使用,并且能够以编程方式上传和删除文件。然而,复制对象似乎是一个大问题。 首先,我的存储桶列表总是返回 0 个结果: s3
目前每次我运行管道时都会得到这个:Permission denied (publickey). 到目前为止的步骤: 在苹果机上: cd ~/.ssh ssh-keygen -t rsa -N '' -
我是一名优秀的程序员,十分优秀!