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 / 问题 / 1147622
Accepted
Mirto Busico
Mirto Busico
Asked: 2019-06-01 01:06:30 +0800 CST2019-06-01 01:06:30 +0800 CST 2019-06-01 01:06:30 +0800 CST

juju charmed-kubernetes - 最低硬件要求是什么?

  • 772

我需要知道部署 charmed-kubernetes 魅力的硬件要求是什么。

我在此配置上尝试失败(安装永远不会结束):

硬件:配备 Intel i7 和 32Gb RAM 的笔记本电脑

虚拟机:三个 kvm 虚拟机,带有 8 个处理器和 8Gb RAM

云:三节点 LXD 集群

运行 juju 的控制工作站

所有机器都有 Kubuntu 18.04。LXD 是 3.12 版 snap 安装

我使用了命令

juju deploy charmed-kubernetes

3小时后,该过程从未结束。

从硬件完全重新启动后,我最终遇到了这种情况:

Model    Controller          Cloud/Region        Version  SLA          Timestamp
default  lxd-remote-default  lxd-remote/default  2.6.2    unsupported  10:50:30+02:00

App                    Version  Status   Scale  Charm                  Store       Rev  OS      Notes
easyrsa                3.0.1    active     0/1  easyrsa                jujucharms  248  ubuntu  
etcd                   3.2.10   active       3  etcd                   jujucharms  426  ubuntu  
flannel                0.10.0   active     1/3  flannel                jujucharms  417  ubuntu  
kubeapi-load-balancer  1.14.0   active     0/1  kubeapi-load-balancer  jujucharms  642  ubuntu  exposed
kubernetes-master      1.14.2   waiting    1/2  kubernetes-master      jujucharms  678  ubuntu  
kubernetes-worker      1.14.2   waiting    2/3  kubernetes-worker      jujucharms  536  ubuntu  exposed

Unit                     Workload     Agent      Machine  Public address  Ports     Message
easyrsa/0                unknown      lost       0        240.12.0.59               agent lost, see 'juju show-status-log easyrsa/0'
etcd/0                   active       idle       1        240.13.0.77     2379/tcp  Healthy with 3 known peers
etcd/1*                  active       idle       2        240.11.0.3      2379/tcp  Errored with 0 known peers
etcd/2                   active       idle       3        240.11.0.51     2379/tcp  Errored with 0 known peers
kubeapi-load-balancer/0  unknown      lost       4        240.12.0.125    443/tcp   agent lost, see 'juju show-status-log kubeapi-load-balancer/0'
kubernetes-master/0*     waiting      executing  5        240.13.0.62     6443/tcp  (leader-elected) Waiting for 6 kube-system pods to start
flannel/1*             active       idle                240.13.0.62               Flannel subnet 10.1.90.1/24
kubernetes-master/1      unknown      lost       6        240.12.0.115    6443/tcp  agent lost, see 'juju show-status-log kubernetes-master/1'
flannel/0              unknown      lost                240.12.0.115              agent lost, see 'juju show-status-log flannel/0'
kubernetes-worker/0*     maintenance  executing  7        240.13.0.144              (upgrade-charm) Checking resources
kubernetes-worker/1      maintenance  executing  8        240.13.0.82               (upgrade-charm) Checking resources
kubernetes-worker/2      unknown      lost       9        240.12.0.106              agent lost, see 'juju show-status-log kubernetes-worker/2'
flannel/2              unknown      lost                240.12.0.106              agent lost, see 'juju show-status-log flannel/2'

Machine  State    DNS           Inst id        Series  AZ  Message
0        down     240.12.0.59   juju-1627e9-0  bionic      Stopped
1        started  240.13.0.77   juju-1627e9-1  bionic      Running
2        started  240.11.0.3    juju-1627e9-2  bionic      Running
3        started  240.11.0.51   juju-1627e9-3  bionic      Running
4        down     240.12.0.125  juju-1627e9-4  bionic      Stopped
5        started  240.13.0.62   juju-1627e9-5  bionic      Running
6        down     240.12.0.115  juju-1627e9-6  bionic      Stopped
7        started  240.13.0.144  juju-1627e9-7  bionic      Running
8        started  240.13.0.82   juju-1627e9-8  bionic      Running
9        down     240.12.0.106  juju-1627e9-9  bionic      Stopped

sysop@kvmnode0:~$ 

而且我看到了对硬盘的计数访问。

根据我过去的经验,这表明硬件不足以完成安装。

那么,部署 charmed Kubernetes 的最低硬件要求是什么?

cloud juju lxd kubernetes
  • 1 1 个回答
  • 962 Views

1 个回答

  • Voted
  1. Best Answer
    bogdan
    2019-07-23T08:33:37+08:002019-07-23T08:33:37+08:00

    1) 在笔记本电脑上创建 KVM 虚拟机并通过 ssh 进入

    uvt-kvm create cdk-vm --cpu 6 --memory 10240 --disk 50
    ssh [email protected]
    

    2)在虚拟机上:

    sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get autoclean; sudo apt-get autoremove -y;
    

    3) 安装 LXD

    sudo snap install lxd 
    

    2019-07-17T16:09:50Z 信息等待重启...来自 Canonical✓ 的 lxd 3.14 已安装

    4) 安装JUJU

    sudo snap install juju --classic
    

    来自 Canonical✓ 的 juju 2.6.5 已安装

    5) 从 deb 包迁移 LXD + 清理

    sudo /snap/bin/lxd.migrate
    

    => 连接到源服务器

    => 连接到目标服务器

    => 运行健全性检查

    源服务器为空,无需迁移。

    迁移现已完成,您的容器应该重新联机。

    你想卸载旧的 LXD (yes/no) [default=yes]?

    全部完成。您可能需要关闭当前的 shell 并打开一个新的 shell 以使“lxc”命令正常工作。

    要迁移现有客户端配置,请将 ~/.config/lxc 移动到 ~/snap/lxd/current/.config/lxc

    6) 初始化并设置 LXD

    /snap/bin/lxd init
    

    你想使用 LXD 集群吗?(是/否)[默认=否]:

    是否要配置新的存储池?(是/否)[默认=是]:

    新存储池的名称 [default=default]:

    要使用的存储后端的名称(btrfs、ceph、dir、lvm、zfs)[default=zfs]:dir

    您想连接到 MAAS 服务器吗?(是/否)[默认=否]:

    您想创建一个新的本地网桥吗?(是/否)[默认=是]:

    新桥应该叫什么名字?[默认=lxdbr0]:

    应该使用什么 IPv4 地址?(CIDR 子网表示法,“auto”或“none”)[default=auto]:

    应该使用什么 IPv6 地址?(CIDR 子网表示法,“auto”或“none”)[default=auto]:none

    您希望 LXD 在网络上可用吗?(是/否)[默认=否]:

    您希望自动更新陈旧的缓存图像吗?(是/否)[默认=是]

    你想打印一个 YAML “lxd init” 预置吗?(是/否)[默认=否]:

    7)一起引导

    juju bootstrap
    

    云

    aws

    aws-中国

    aws-gov

    天蓝色

    蔚蓝中国

    云西格玛

    谷歌

    欢乐

    本地主机

    甲骨文

    甲骨文经典

    机架空间

    选择一个云 [localhost]:

    输入控制器的名称 [localhost-localhost]:

    在 localhost/localhost 上创建 Juju 控制器“localhost-localhost”

    寻找amd64的打包juju代理版本2.6.5

    要配置您的系统以更好地支持 LXD 容器,请参阅: https ://github.com/lxc/lxd/blob/master/doc/production-setup.md 在 localhost/localhost 上启动控制器实例... - juju-0c16b8-0 (arch=amd64)
    在引导实例上安装 Juju 代理 正在获取 Juju GUI 2.14.0 等待地址 正在尝试连接到 10.42.215.113:22 连接到 10.42.215.113 正在运行机器配置脚本...引导代理现已启动在 10.42.215.113 联系 Juju 控制器以验证可访问性... 引导完成,控制器“localhost-localhost”现在可用 控制器机器处于“控制器”模型中 初始模型“默认”添加

    8)添加模型 - 保持清洁

    juju add-model cdk-114
    

    在 localhost/localhost 上添加了“cdk-114”模型,用户“admin”的凭据为“localhost”

    9) 编辑 LXC 的配置文件

    lxc profile edit juju-cdk-114
    

    并将其替换为:

    config:
      boot.autostart: "true"
      linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay
      raw.lxc: |
        lxc.apparmor.profile=unconfined
        lxc.mount.auto=proc:rw sys:rw cgroup:rw
        lxc.cgroup.devices.allow=a
        lxc.cap.drop=
      security.nesting: "true"
      security.privileged: "true"
    description: ""
    devices:
      aadisable:
        path: /sys/module/nf_conntrack/parameters/hashsize
        source: /dev/null
        type: disk
      aadisable1:
        path: /sys/module/apparmor/parameters/enabled
        source: /dev/null
        type: disk
    name: juju-cdk-114
    used_by:[]
    

    10) 部署 CDK 1.14

    juju deploy charmed-kubernetes-124
    

    之后(在此处插入时间)取决于您分配的资源:

    Model    Controller           Cloud/Region         Version  SLA          Timestamp
    cdk-114  localhost-localhost  localhost/localhost  2.6.5    unsupported  17:25:52+01:00
    
    App                    Version  Status  Scale  Charm                  Store       Rev  OS      Notes
    easyrsa                3.0.1    active      1  easyrsa                jujucharms  253  ubuntu  
    etcd                   3.2.10   active      3  etcd                   jujucharms  431  ubuntu  
    flannel                0.10.0   active      5  flannel                jujucharms  424  ubuntu  
    kubeapi-load-balancer  1.14.0   active      1  kubeapi-load-balancer  jujucharms  647  ubuntu  exposed
    kubernetes-master      1.14.3   active      2  kubernetes-master      jujucharms  695  ubuntu  
    kubernetes-worker      1.14.3   active      3  kubernetes-worker      jujucharms  549  ubuntu  exposed
    
    Unit                      Workload  Agent  Machine  Public address  Ports           Message
    easyrsa/0*                active    idle   0        10.54.179.170                   Certificate Authority connected.
    etcd/0*                   active    idle   1        10.54.179.128   2379/tcp        Healthy with 3 known peers
    etcd/1                    active    idle   2        10.54.179.106   2379/tcp        Healthy with 3 known peers
    etcd/2                    active    idle   3        10.54.179.26    2379/tcp        Healthy with 3 known peers
    kubeapi-load-balancer/0*  active    idle   4        10.54.179.93    443/tcp         Loadbalancer ready.
    kubernetes-master/0*      active    idle   5        10.54.179.193   6443/tcp        Kubernetes master running.
      flannel/3*              active    idle            10.54.179.193                   Flannel subnet 10.1.2.1/24
    kubernetes-master/1       active    idle   6        10.54.179.86    6443/tcp        Kubernetes master running.
      flannel/4               active    idle            10.54.179.86                    Flannel subnet 10.1.71.1/24
    kubernetes-worker/0       active    idle   7        10.54.179.245   80/tcp,443/tcp  Kubernetes worker running.
      flannel/0               active    idle            10.54.179.245                   Flannel subnet 10.1.89.1/24
    kubernetes-worker/1       active    idle   8        10.54.179.141   80/tcp,443/tcp  Kubernetes worker running.
      flannel/1               active    idle            10.54.179.141                   Flannel subnet 10.1.33.1/24
    kubernetes-worker/2*      active    idle   9        10.54.179.230   80/tcp,443/tcp  Kubernetes worker running.
      flannel/2               active    idle            10.54.179.230                   Flannel subnet 10.1.91.1/24
    

    您不需要在 VM 中运行它。如果您按照我在此处展示的方式在笔记本电脑/台式机 + LXD 上部署 JUJU,则在完成测试后,只需删除模型即可。这将删除所有创建的应用程序和 LXC 容器。

    juju destroy-model cdk-114
    WARNING! This command will destroy the "cdk-114" model.
    This includes all machines, applications, data and other resources.
    
    Continue [y/N]? y
    Destroying model
    Waiting for model to be removed, 10 machine(s), 6 application(s)................
    ..
    Waiting for model to be removed, 9 machine(s), 6 application(s).....
    Waiting for model to be removed, 8 machine(s), 6 application(s)......
    Waiting for model to be removed, 7 machine(s), 6 application(s).......
    Waiting for model to be removed, 7 machine(s), 4 application(s)....
    Waiting for model to be removed, 6 machine(s), 3 application(s)...
    Waiting for model to be removed, 5 machine(s), 1 application(s)....
    Waiting for model to be removed, 5 machine(s)...
    Waiting for model to be removed, 4 machine(s).....
    Waiting for model to be removed, 3 machine(s).........
    Waiting for model to be removed, 1 machine(s)...
    Waiting for model to be removed...
    Model destroyed.
    

    我希望这将有所帮助。

    • 3

相关问题

  • 有 Gmail 云端硬盘吗?

  • 运行虚拟机和 Ubuntu EC2 云有什么区别?

  • 建立个人云而不是在没有虚拟化的情况下运行个人服务器有什么优势吗?

  • 什么是 Ubuntu One?

  • 是否有关于如何设置演示云的简单指南?

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