【问题标题】:How to deploy GKE specific version using ansible如何使用 ansible 部署 GKE 特定版本
【发布时间】:2021-07-01 05:30:30
【问题描述】:

我尝试使用 ansible 来部署 GKE 集群。但是当我将 initialClusterVersion 与 ansible gcp_container_cluster 一起使用时,错误输出是这样的。

致命:[本地主机]:失败! => {“改变”:假,“味精”:“不支持 (gcp_container_cluster) 模块的参数:initialClusterVersion 支持的参数包括:addons_config、auth_kind、 cluster_ipv4_cidr,default_max_pods_constraint,描述, enable_tpu,env_type,initial_node_count,ip_allocation_policy, kubectl_context,kubectl_path,legacy_abac,位置,位置, logging_service,master_auth,monitoring_service,名称,网络, network_policy,node_config,private_cluster_config,项目, 资源标签、范围、服务帐户内容、 service_account_email、service_account_file、状态、子网、 tpu_ipv4_cidr_block"}

【问题讨论】:

  • 您应该提供一个minimal reproducible example 来重现您的问题,否则这将是简单的猜测。您的 Ansible 版本可能也会有所帮助。

标签: kubernetes google-cloud-platform ansible google-kubernetes-engine


【解决方案1】:

initialClusterVersion 是 return value,而不是参数。

如果使用 Ansible 2.10 或 3 版,您可以使用 initial_cluster_version parameter。

查看列出支持的参数的错误消息,我假设您使用的是旧版本,因此如果您需要使用 initial_cluster_version 参数,则需要升级。

【讨论】:

    【解决方案2】:

    感谢您的回答。我正在使用 Ansible 2.9。 无论如何,我设法使用 gcp_container_node_pool 获得了正确的版本。 作为一种解决方法,我使用节点池 GKE 版本。

    - gcp_container_node_pool 
        version: 1.18.16-gke.302 
    

    【讨论】:

      猜你喜欢
      • 2014-01-28
      • 2015-04-29
      • 1970-01-01
      • 1970-01-01
      • 2020-07-23
      • 2020-09-26
      • 2021-07-31
      • 2021-03-01
      相关资源
      最近更新 更多