创建私有GKE集群

时间:2019-10-01 15:49:48

标签: yaml cluster-computing google-kubernetes-engine google-deployment-manager

使用Yaml创建私有gke集群。

目前正在研究创建私有gke。尝试在yaml文件中添加私人设置,但出现错误

resources:
- name: myclus
  type: gcp-types/container-v1:projects.locations.clusters
  properties:
    parent: projects/[PROJECT_ID]/locations/[REGION]
    cluster:
      name: my-clus
      zone: [ZONE]
      network: [NETWORK]
      subnetwork: [SUBNETWORK]    ### leave this field blank if using the default network###
      initialClusterVersion: "1.13"
      nodePools:
      - name: my-clus-pool1
        initialNodeCount: 1
        autoscaling:
          enabled: true
          minNodeCount: 1
          maxNodeCount: 12
        management:
          autoUpgrade: true
          autoRepair: true  
        config:
          machineType: n1-standard-1
          diskSizeGb: 15
          imageType: cos
          diskType: pd-ssd
          oauthScopes:             ###Change scope to match needs###
            - https://www.googleapis.com/auth/cloud-platform
          preemptible: false

正在寻找它来创建一个没有外部IP的私有集群。

1 个答案:

答案 0 :(得分:0)

您有没有机会翻阅本文档?

https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#public_master

好吧,我还找到了另一个官方Google文档,可以帮助您实现所需的目标:

https://cloud.google.com/solutions/creating-kubernetes-engine-private-clusters-with-net-proxies

在“创建Docker映像”部分中,有一个Dockerfile示例。

好运!