AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1322084
Accepted
Chameleon
Chameleon
Asked: 2021-03-09 08:21:33 +0800 CST2021-03-09 08:21:33 +0800 CST 2021-03-09 08:21:33 +0800 CST

在 localhost 上安装 Ubuntu Kubernates 1.20 -> 文档导致错误 -> 等待 3 个 kube-system pod 启动

  • 772

我在 VirtualBox 上创建了全新的 Ubuntu 20.03,而不是使用文档开始安装。机器有 Quadro RTX 卡(可能会影响?)。

文档很混乱,因为有很多方法可以做——我检查了几乎所有方法,结果非常糟糕,因为它从未导致成功。你能帮忙安装吗,或者 Ubuntu Kubernetes 不能工作,这是浪费时间?

是否需要额外的日志?

导致此错误的无效文档:

  1. https://ubuntu.com/kubernetes/install#multi-node
  2. https://ubuntu.com/kubernetes/docs/install-manual
  3. https://ubuntu.com/kubernetes/docs/install-local

首先我尝试:

sudo snap install lxd

sudo lxd init
# all default apart:
# dir
# ipv6 none

sudo snap install juju --classic
juju bootstrap localhost

juju add-model k8s
juju deploy charmed-kubernetes

结果是 10 台机器而不是工作主机 :)

kubernetes-master/0*      waiting   idle   5        10.184.167.240  6443/tcp        Waiting for 3 kube-system pods to start
  containerd/2            active    idle            10.184.167.240                  Container runtime available
  flannel/2               active    idle            10.184.167.240                  Flannel subnet 10.1.1.1/24
kubernetes-master/1       waiting   idle   6        10.184.167.89   6443/tcp        Waiting for 3 kube-system pods to start
  containerd/3            active    idle            10.184.167.89                   Container runtime available
  flannel/3               active    idle            10.184.167.89                   Flannel subnet 10.1.43.1/24

完整状态是:

juju status --color
Model           Controller           Cloud/Region         Version  SLA          Timestamp
k8s-production  localhost-localhost  localhost/localhost  2.8.9    unsupported  17:00:24+01:00

App                    Version  Status   Scale  Charm                  Store       Rev  OS      Notes
containerd             1.3.3    active       5  containerd             jujucharms  102  ubuntu  
easyrsa                3.0.1    active       1  easyrsa                jujucharms  345  ubuntu  
etcd                   3.4.5    active       3  etcd                   jujucharms  553  ubuntu  
flannel                0.11.0   active       5  flannel                jujucharms  518  ubuntu  
kubeapi-load-balancer  1.18.0   active       1  kubeapi-load-balancer  jujucharms  757  ubuntu  exposed
kubernetes-master      1.20.4   waiting      2  kubernetes-master      jujucharms  955  ubuntu  
kubernetes-worker      1.20.4   active       3  kubernetes-worker      jujucharms  726  ubuntu  exposed

Unit                      Workload  Agent  Machine  Public address  Ports           Message
easyrsa/0*                active    idle   0        10.184.167.48                   Certificate Authority connected.
etcd/0*                   active    idle   1        10.184.167.23   2379/tcp        Healthy with 3 known peers
etcd/1                    active    idle   2        10.184.167.180  2379/tcp        Healthy with 3 known peers
etcd/2                    active    idle   3        10.184.167.194  2379/tcp        Healthy with 3 known peers
kubeapi-load-balancer/0*  active    idle   4        10.184.167.106  443/tcp         Loadbalancer ready.
kubernetes-master/0*      waiting   idle   5        10.184.167.240  6443/tcp        Waiting for 3 kube-system pods to start
  containerd/2            active    idle            10.184.167.240                  Container runtime available
  flannel/2               active    idle            10.184.167.240                  Flannel subnet 10.1.1.1/24
kubernetes-master/1       waiting   idle   6        10.184.167.89   6443/tcp        Waiting for 3 kube-system pods to start
  containerd/3            active    idle            10.184.167.89                   Container runtime available
  flannel/3               active    idle            10.184.167.89                   Flannel subnet 10.1.43.1/24
kubernetes-worker/0*      active    idle   7        10.184.167.52   80/tcp,443/tcp  Kubernetes worker running.
  containerd/0*           active    idle            10.184.167.52                   Container runtime available
  flannel/0*              active    idle            10.184.167.52                   Flannel subnet 10.1.20.1/24
kubernetes-worker/1       active    idle   8        10.184.167.226  80/tcp,443/tcp  Kubernetes worker running.
  containerd/4            active    idle            10.184.167.226                  Container runtime available
  flannel/4               active    idle            10.184.167.226                  Flannel subnet 10.1.6.1/24
kubernetes-worker/2       active    idle   9        10.184.167.158  80/tcp,443/tcp  Kubernetes worker running.
  containerd/1            active    idle            10.184.167.158                  Container runtime available
  flannel/1               active    idle            10.184.167.158                  Flannel subnet 10.1.12.1/24

Machine  State    DNS             Inst id        Series  AZ  Message
0        started  10.184.167.48   juju-c4f295-0  focal       Running
1        started  10.184.167.23   juju-c4f295-1  focal       Running
2        started  10.184.167.180  juju-c4f295-2  focal       Running
3        started  10.184.167.194  juju-c4f295-3  focal       Running
4        started  10.184.167.106  juju-c4f295-4  focal       Running
5        started  10.184.167.240  juju-c4f295-5  focal       Running
6        started  10.184.167.89   juju-c4f295-6  focal       Running
7        started  10.184.167.52   juju-c4f295-7  focal       Running
8        started  10.184.167.226  juju-c4f295-8  focal       Running
9        started  10.184.167.158  juju-c4f295-9  focal       Running

与文档中的其他排序相同,都一无所获。也许我做错了什么,也许 Ubuntu Kubernetes 不能在 localhost 上运行。

juju add-model k8s-production
juju deploy cs:bundle/charmed-kubernetes-596

即使是这种小型部署也不起作用(安装永远不会结束)。

juju add-model k8s-development
juju deploy cs:bundle/kubernetes-core-1200
juju
  • 1 1 个回答
  • 447 Views

1 个回答

  • Voted
  1. Best Answer
    Chameleon
    2021-03-10T09:52:07+08:002021-03-10T09:52:07+08:00

    我看起来这是解决方法:

    juju config kubernetes-worker kubelet-extra-config='{protectKernelDefaults: false}'
    

    https://bugs.launchpad.net/charmed-kubernetes-bundles/+bug/1918160

    • 0

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve