如何在云主机和本地服务器之间设置RKE / Rancher2群集

时间:2020-10-23 11:38:37

标签: kubernetes rancher strongswan rke rancher-rke

我想建立一个具有2个节点的Kubernetes(rke)集群:

  • 节点1:
    • 运行Ubuntu
    • 位于Hetzner云上
    • 网络10.100.0.0/24
    • 通过StrongSwan设置到我们的网络网关(unifi路由器-站点到站点VPN)的IPSec隧道
    • 通过ipsec隧道可以达到10.10.1.10
    • 应运行负载平衡器以从外部访问应用程序
  • 节点2:
    • 运行RancherOS
    • 位于我们的办公室
    • 网络10.10.1.8/30
    • 可以通过网络网关达到10.100.0.0
    • 现在应该运行大多数应用程序

我的配置:

nodes:
    - address: 10.10.1.10
      user: rancher
      role:
        - controlplane
        - etcd
        - worker
      labels:
        location: office
    - address: <hetzner-cloudserver-address>
      user: root
      role:
        - worker
      internal_address: 10.100.0.2
      labels:
        app: ingress
        location: hetzner

ssh_key_path: <path/to/key>

# If set to true, RKE will not fail when unsupported Docker version
# are found
ignore_docker_version: false

# Enable use of SSH agent to use SSH private keys with passphrase
# This requires the environment `SSH_AUTH_SOCK` configured pointing
#to your SSH agent which has the private key added
ssh_agent_auth: false

# Set the name of the Kubernetes cluster
cluster_name: infrastructure

# Kubernetes version
kubernetes_version: v1.19.3-rancher1-1

# Specify network plugin-in (canal, calico, flannel, weave, or none)
network:
    plugin: canal

# Currently only nginx ingress provider is supported.
# To disable ingress controller, set `provider: none`
# `node_selector` controls ingress placement and is optional
ingress:
    provider: nginx
    node_selector:
      app: ingress

办公室中的节点已完全启动,并且似乎已正常运行。但是,云服务器上的节点无法设置网络容器。我已经尝试过所有网络插件,但仍然遇到相同的问题。

有办法使它工作吗?

预先感谢 斯文

0 个答案:

没有答案