如何将授权集群端点添加到由牧场主创建的RKE2群集

发布于 2025-02-11 04:42:19 字数 1574 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深府石板幽径 2025-02-18 04:42:19

在每个下游群集的控制平面上采取的手动步骤以启用ACE:

  1. 在/var/lib/rancher/ {rke2,k3s }/kbube-api-api-authn-webhook.yaml上创建一个文件使用以下内容:
apiVersion: v1
kind: Config
clusters:
- name: Default
  cluster:
    insecure-skip-tls-verify: true
    server: http://127.0.0.1:6440/v1/authenticate
users:
- name: Default
  user:
    insecure-skip-tls-verify: true
current-context: webhook
contexts:
- name: webhook
  context:
    user: Default
    cluster: Default

  1. 将以下内容添加到配置文件(或创建一个,如果不存在);请注意,默认位置为/etc/rancher/ {rke2,k3s }/config.yaml:
kube-apiserver-arg:
    - authentication-token-webhook-config-file=/var/lib/rancher/{rke2,k3s}/kube-api-authn-webhook.yaml
  1. 运行以下命令:
sudo systemctl stop {rke2,k3s}-server
sudo systemctl start {rke2,k3s}-server
  1. 最后,您必须返回Rancher UI并在此处编辑导入的群集以完成ACE启用。单击⋮> 编辑config ,然后单击网络选项卡 cluster配置。最后,单击启用按钮,以获取授权端点。启用ACE后,您就可以选择输入完全合格的域名(FQDN)和证书信息。

Manual steps to be taken on the control plane of each downstream cluster to enable ACE:

  1. Create a file at /var/lib/rancher/{rke2,k3s}/kube-api-authn-webhook.yaml with the following contents:
apiVersion: v1
kind: Config
clusters:
- name: Default
  cluster:
    insecure-skip-tls-verify: true
    server: http://127.0.0.1:6440/v1/authenticate
users:
- name: Default
  user:
    insecure-skip-tls-verify: true
current-context: webhook
contexts:
- name: webhook
  context:
    user: Default
    cluster: Default

  1. Add the following to the config file (or create one if it doesn’t exist); note that the default location is /etc/rancher/{rke2,k3s}/config.yaml:
kube-apiserver-arg:
    - authentication-token-webhook-config-file=/var/lib/rancher/{rke2,k3s}/kube-api-authn-webhook.yaml
  1. Run the following commands:
sudo systemctl stop {rke2,k3s}-server
sudo systemctl start {rke2,k3s}-server
  1. Finally, you must go back to the Rancher UI and edit the imported cluster there to complete the ACE enablement. Click on ⋮ > Edit Config, then click the Networking tab under Cluster Configuration. Finally, click the Enabled button for Authorized Endpoint. Once the ACE is enabled, you then have the option of entering a fully qualified domain name (FQDN) and certificate information.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文