是否有可能创build不同的核心os群集全部链接到1 etcd群集? 如果是的话,怎么样? 我有一个场景,我需要创build多个群集,但我想保留一个etcd群集。 目前我最终将所有的实例放在同一个集群中,甚至是自己的。 我如何确保有单独的群集? 我使用的方法是每个实例中的etcd2服务都有一个dropin环境文件(在云configuration中),其中包括有关初始集群
我刚刚开始使用CoreOS,我一直按照关于设置Kubernetes的一步一步的教程,但我似乎缺less一个非常基本的概念。 在我使用Bare Metal的时候,我使用指向NGINX webserver的cloud-config-url参数给出一些非常基本的云configuration文件,它替代了主机的ip(由dhcp给出)。 像这样的东西: #cloud-config coreos: etcd2: discovery: "https://discovery.etcd.io/2ab74sd3a59583012056187ee8b74e9a" advertise-client-urls: "http://$public_ipv4:2379" initial-advertise-peer-urls: "http://$public_ipv4:2380" listen-client-urls: "http://0.0.0.0:2379,http://0.0.0.0:4001" listen-peer-urls: "http://$public_ipv4:2380,http://$public_ipv4:7001" units: – name: etcd2.service command: start – name: fleet.service command: start ssh_authorized_keys: …. 这可以。 有用。 但是如果我想运行一个不包含etcd2configuration的服务呢? 或者将服务添加到服务器的特定子集? 你们如何处理这种情况? 是否有更多的参数或内核传递给cloud-config-url ? 我怎么能在NGINX中使用它? 感谢您的反馈意见
我们有一个问题,我们的服务器托pipe我们的容器无法访问他们的IP,而networking上的其他计算机可以。 我们已经为我们的局域网设置了以下设置: 通过两条电缆(运行CoreOS 1068.10.0和Docker 1.10.3)连接到路由器的服务器 连接服务器和客户端的路由器 许多客户端计算机都直接连接到路由器或通过连接到路由器的交换机 所以我们的networking看起来像这样,超级简单: |———| |———| |———| | Docker |———–| Router |———–| Other computers/ | Host |———–| | | NAS/etc | |———| |———| |———| 为了将我们的容器暴露给我们的networking,我们遵循这个答案: https : //stackoverflow.com/a/35799206 即我们使用的命令是这些: docker network create \ –subnet 192.168.0.0/16 \ –aux-address "DefaultGatewayIPv4=192.168.0.1" \ –gateway=192.168.1.1 \ -o com.docker.network.bridge.name=br-internal_lan internal_lan sudo brctl addif br-internal_lan eno1 sudo ip […]
我试图debugging一个问题,我想知道这是否会给任何人敲响钟声:我的日志被淹没了 audit: type=1107 audit(1479418315.344:1053): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:kernel_t:s0 msg='Unknown class service exe="/usr/lib64/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'; 这似乎发生在SSH连接启动(我们有很多,服务器互相通话和维护隧道等) 我做了auditctl -D清除所有审计规则(只是为了testing哪个规则产生的),但它没有效果… 我对SELinux的使用经验有限,所以我甚至不知道要找什么。 谢谢!
我有一个基本的cloud-config.yaml在cloud-config.yaml上运行四个容器(直接,没有集群)。 两个容器( nginx-gen和nginx-letsencrypt )从名为nginx的容器中挂载卷。 每个容器启动都被定义为一个systemd单元。 我已经添加了After=和Requires=依赖关系,但是在首次login时,我迎接: CoreOS stable (1185.5.0) Failed Units: 2 letsencrypt.service nginx-gen.service nginx (提供音量的那个)正在运行。 如果之后我执行: sudo systemctl start nginx-gen.service sudo systemctl start letsencrypt.service 他们开始和正确运行,所以我想这个问题是在系统启动依赖。 我没有CoreOS和systemd的经验,所以原因可能是非常基本的(比如在Docker容器实际运行之前获得“完整”状态的单元)。 看着journalctl日志,事实上nginx-gen服务在它有机会从nginx挂载卷之前就失败了: … Jan 02 14:35:47 core-01 systemd[1]: nginx-gen.service: Failed with result 'start-limit-hit'. … Jan 02 14:36:03 core-01 docker[1401]: Status: Downloaded newer image for nginx:latest … 我能做些什么来解决这个问题? 我的cloud-config.yaml : […]
我从一个点火模板安装了一堆CoreOS机器,通过火柴盒服务。 机器运行1185.3.0,这不是最新的稳定版本。 不过,它们不会自动更新。 我可以使用update_engine_client -check_for_update手动触发更新,并且他们会正确更新。 以下是自动更新检查的日志摘录: Feb 16 23:16:35 kore6 update_engine[32226]: I0216 23:16:35.101521 32226 prefs.cc:51] certificate-report-to-send-update not present in /var/lib/update_engine/prefs Feb 16 23:16:35 kore6 update_engine[32226]: I0216 23:16:35.101647 32226 prefs.cc:51] certificate-report-to-send-download not present in /var/lib/update_engine/prefs Feb 16 23:16:35 kore6 update_engine[32226]: I0216 23:16:35.102347 32226 omaha_request_params.cc:58] Current group set to stable Feb 16 23:16:35 kore6 update_engine[32226]: I0216 23:16:35.102634 […]
我在CoreOS的cloud-config文件中configurationsystemd。 如果我正确理解这一点,我有两种启动单元的方法: 方法1,使用[Install] (如数字海洋指南中所述 ): – name: initialize_data content: | [Unit] Description=Run a command [Service] Type=oneshot ExecStart=/usr/bin/mkdir /foo [Install] WantedBy=multi-user.target 方法2,删除[Install] -section并使用command: start : – name: initialize_data command: start content: | [Unit] Description=Run a command [Service] Type=oneshot ExecStart=/usr/bin/mkdir /foo 是否有使用command: start单位的任何缺点command: start ? 我得到,我无法控制它将开始之后,但其他什么? 它会尊重[Unit]指令,如Requires=和After= ?
在DigitalOcean上使用CoreOS 1353.4.0,我应该如何为要join具有dynamic发现的etcd群集的计算机编写点火configuration? 我已经写了下面的Ignitionconfiguration(基本上符合本指南 ),但似乎有问题,因为我不能SSH进入configuration的机器,也不能ping通它们: etcd: advertise_client_urls: http://{PRIVATE_IPV4}:2379 discovery: https://discovery.etcd.io/715ba22c9924d4edd7aa674eeefddf87 initial_advertise_peer_urls: http://{PRIVATE_IPV4}:2380 listen_client_urls: http://0.0.0.0:2379 listen_peer_urls: http://{PRIVATE_IPV4}:2380 name: '{HOSTNAME}' 这个configuration文件通过执行CoreOSconfiguration转换器变成本地Ignition语法: ct -in-file config.yaml -out-file config.ign -platform digitalocean 。 我怀疑configuration的责任,因为在机器启动过程中有一些警告。 滴创build没有任何configurationfunction好,这意味着我可以ping和SSH到他们。
我在Google云端平台上安装了两个虚拟机。 server1使用Ubuntu 16.04映像[g1-small(1 vCPU,1.7 GB内存)]; 而新创build的名为server2 VM使用CoreOS稳定映像[f1-micro(1 vCPU,0.6 GB内存)]。 主要的问题是我无法连接到server2即使我使用相同的SSH密钥和用户。 我将使用这个链接来比较ssh -v两个输出结果。 为了确保我testing了这个权利,我删除了文件/Users/userz/.ssh的文件google_compute_engine , google_compute_engine.pub , google_compute_known_hosts和来自known_hosts的内容。 然后执行命令gcloud init ,然后执行gcloud compute config-ssh ,它检测到没有SSH密钥,并且在请求密码而不是密码时通过创build新密钥来指导我。 这个新的SSH密钥是在这个testing中使用的。 如果你看到server1的第一个链接,ssh最终会询问密码。 但是对于server2 ssh最终会要求input一个密码,这与input的内容无关,每次input都是错误的。 我尝试的密码是:相同的密码,我的谷歌帐户的login密码,本地机器的pipe理员密码,以及我记得使用的其他任何密码。 而错误的input。 当我使用相同的方法连接到虚拟机时,为什么会有这种差异? 我可以做些什么来解决这个问题,因为我不知道也没有在server2 (新创build)上设置任何密码? 我可以补充说明,通过Cloud Shell连接请求密码并轻松连接。 server1输出: ssh -v server1 OpenSSH_7.4p1, LibreSSL 2.5.0 debug1: Reading configuration data /Users/userz/.ssh/config debug1: /Users/userz/.ssh/config line 51: Applying options for server1 debug1: […]
我目前正试图获得一个dynamic的端口,所以我可以在CoreOS上注册与etcd。 这certificate非常困难。 这是我的单位文件 [Unit] Description=test Elastic Search Server After=docker.service Requires=docker.service [Service] User=core ExecStartPre=/usr/bin/docker pull shizzle/elasticsearch-server ExecStart=/bin/bash -c '/usr/bin/docker start -a %n || /usr/bin/docker run –name="%n" -p :9200 -p :9300 shizzle/elasticsearch-server /elasticsearch/bin/elasticsearch -Des.config=/etc/elasticsearch.yml' ExecStartPost=-/usr/bin/etcdctl mkdir /%n ExecStartPost=/usr/bin/etcdctl set /%n/host %H ExecStartPost=/bin/bash -c "/usr/bin/etcdctl set /%n/port $(docker inspect –format='{{(index (index .NetworkSettings.Ports "9200/tcp") 0).HostPort}}' %n)" ExecStop=/usr/bin/docker stop /%n […]