Environment  环境

An RKE Kubernetes cluster provisioned by the Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x
由 Rancher Kubernetes Engine (RKE) CLI 或 Rancher v2.x 配置的 RKE Kubernetes 集群

Situation  地理位置
This article details how to enable TLS 1.1 on the ingress-nginx controller in Rancher Kubernetes Engine (RKE) CLI or Rancher v2.x provisioned RKE Kubernetes clusters.
本文详细介绍了如何在 Rancher Kubernetes Engine(RKE)CLI 或 Rancher v2.x 配置 RKE 集群中的 ingress-nginx 控制器上启用 TLS 1.1。
Pre-requisites:  先修条件:
 
 
Resolution  结局

Configuration for RKE CLI provisioned clusters
RKE CLI 配置集群配置

  1. Edit the cluster configuration YAML file to include the ssl-protocols option for the ingress, as follows:
    编辑集群配置的 YAML 文件,加入入口的 ssl 协议选项,具体如下:

      ingress:
        provider: nginx
        options:
          ssl-protocols: "TLSv1.1 TLSv1.2"
  2. Apply the changes to the cluster, by invoking rke up:
    通过调用 rke up,将这些更改应用到集群上:

    rke up --config <cluster configuration yaml file>
  3. Verify the new configuration:
    验证新配置:

    for pod in $(kubectl get pods -l app=ingress-nginx -n ingress-nginx --no-headers -o name | awk -F '/' '{print $2}'); do echo -n "Checking $pod .... "; kubectl -n ingress-nginx exec "$pod" -- bash -c "cat /etc/nginx/nginx.conf | grep ssl_protocols | grep '1.1' > /dev/null 2>&1 && echo 'Good' || echo 'Bad'"; done

Configuration for Rancher-provisioned RKE clusters
Rancher 配置的 RKE 集群配置

  1. Login into the Rancher UI
    登录牧场主界面

  2. Go to Cluster Management
    前往集群管理
  3. Click Edit Config for the relevant Rancher-provisioned RKE cluster
    点击编辑配置以查看相关的 Rancher 配置 RKE 集群
  4. Click Edit as YAML
    点击编辑为 YAML 代码
  5. Include the ssl-protocols option for the ingress, as follows:
    为入口包含 SSL 协议选项,具体如下:

    ingress:
      provider: nginx
      options:
        ssl-protocols: "TLSv1.1 TLSv1.2"
  6. Click Save at the bottom of the page
    点击页面底部的保存

  7. Wait for cluster to finish upgrading
    等集群升级完成
  8. Explore the cluster and launch a kubectl shell
    探索星团并发射库贝克特尔炮弹
  9. Run the following inside the kubectl shell to verify the new argument:
    在 kubectl shell 内运行以下操作以验证新参数:
    for pod in $(kubectl get pods -l app=ingress-nginx -n ingress-nginx --no-headers -o name | awk -F '/'

访问Rancher-K8S解决方案博主,企业合作伙伴 :
https://blog.csdn.net/lidw2009

更多推荐