- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何将已有的GKE集群改成GKE私有(private)集群?我是否能够根据防火墙规则从 Internet 连接到 Kubectl API,或者我应该有一个堡垒主机吗?我不想实现 Cloud Nat
或 nat gateway
。我有一个 squid 代理 VM,可以处理 pod 的互联网访问。我只需要能够连接到 Kubectl 即可应用或修改任何内容。
我不确定如何修改我编写的现有模块以使节点私有(private)化,并且我不确定如果我尝试应用与私有(private) gke 集群相关的新更改是否会删除该集群。
resource "google_container_cluster" "primary" {
name = "prod"
network = "prod"
subnetwork = "private-subnet-a"
location = "us-west1-a"
remove_default_node_pool = true
initial_node_count = 1
depends_on = [var.depends_on_vpc]
}
resource "google_container_node_pool" "primary_nodes" {
depends_on = [var.depends_on_vpc]
name = "prod-node-pool"
location = "us-west1-a"
cluster = google_container_cluster.primary.name
node_count = 2
node_config {
preemptible = false
machine_type = "n1-standard-2"
metadata = {
disable-legacy-endpoints = "true"
}
oauth_scopes = [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/compute",
]
}
}
最佳答案
回答问题的一部分:
How to change the existing GKE cluster to GKE private cluster?
GKE
设置:Private cluster
是不可变的。 此设置只能在 GKE
集群配置期间设置.
要将集群创建为私有(private)集群,您可以:
GKE
私有(private)集群。GCP Cloud Console
中可用 -> Kubernetes Engine
-> CLUSTER-NAME
-> Duplicate
Pods
、Deployments
等)Will I be able to connect to the Kubectl API from internet based on firewall rules or should I have a bastion host?
是的,你可以,但这在很大程度上取决于你在 GKE
集群创建过程中选择的配置。
至于连接到您的 GKE
私有(private)集群的能力,有专门的文档介绍:
至于如何使用 Terraform 创建私有(private)集群,有专门的站点,其中包含特定于 GKE
的配置选项。还有一些参数负责配置一个private
集群:
关于使用 Terraform 创建私有(private) GKE
集群的基本示例:
main.tf
provider "google" {
project = "INSERT_PROJECT_HERE"
region = "europe-west3"
zone = "europe-west3-c"
}
gke.tf
resource "google_container_cluster" "primary-cluster" {
name = "gke-private"
location = "europe-west3-c"
initial_node_count = 1
private_cluster_config {
enable_private_nodes = "true"
enable_private_endpoint = "false" # this option will make your cluster available through public endpoint
master_ipv4_cidr_block = "172.16.0.0/28"
}
ip_allocation_policy {
cluster_secondary_range_name = ""
services_secondary_range_name = ""
}
node_config {
machine_type = "e2-medium"
}
}
A side note!
I've created a public
GKE
cluster, modified the.tf
responsible for it's creation to support private cluster. After running:$ terraform plan
Terraform responded with the information that the cluster will be recreated.
关于kubernetes - 使用 terraform 将公共(public) GKE 更改为私有(private) GKE 集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65916344/
我有标准 GKE 集群,并且希望将所有正在运行的服务迁移到新的 Autopilot 集群。我研究了官方文档,但没有找到任何如何执行此迁移的信息 最佳答案 目前,此操作无法将 Standard GKE
我最近设置了一个 GKE 自动驾驶仪,但意识到它不支持 cert-manager 所依赖的 webhook。我们必须向 GKE 自动驾驶集群添加/管理 SSL 证书的其他选项是什么? 最佳答案 截至
我在 K8s 1.14.10 上创建了两个单独的 GKE 集群。 VPN access to in-house network not working after GKE cluster upgrad
我注意到我们的 gke 集群系统 pod (gke-metrics-agent) 内存不足。我试图编辑 daemonset yaml 文件以将内存请求增加到 200Mi 并将内存限制增加到 200Mi
我有多个在 GKE 上运行的 kubernetes 集群(假设是 clusterA 和 clusterB) 我想在其中一个集群中运行的应用程序中从 client-go 访问这两个集群(例如,从在 cl
如何将已有的GKE集群改成GKE私有(private)集群?我是否能够根据防火墙规则从 Internet 连接到 Kubectl API,或者我应该有一个堡垒主机吗?我不想实现 Cloud Nat 或
我目前正在运行一个区域性 GKE 集群,并希望迁移到一个新的区域性集群。旧集群有一个带有公共(public) IP 的入口对象,使用谷歌托管证书来终止 HTTPS。 我的迁移计划是: 创建新的区域集群
我们有一个 GKE 集群: 版本为 1.6.13-gke.0 的主节点 2 个版本为 1.6.11-gke.0 的节点池 我们已激活 Stackdriver Monitoring 和 Logging。
从昨天开始,我在 K8s 上遇到了一个奇怪的错误(使用 GKE) 我有一个运行 1 个 pod 的部署。我删除了部署,它用于终止 pod 和使用它的副本集。 但是现在,如果我删除部署,副本集不会被删除
我正在使用 Google 容器引擎。现在我想要在我的集群中使用自动缩放功能。根据文档 GKE 自动调节程序 在 测试版 .我还可以在 中启用自动缩放实例组即管理集群节点。 集群自动缩放器添加/删除节点
我想在Google容器引擎中运行nexus3。 我创建了一个永久磁盘,并配置了以下部署文件: apiVersion: apps/v1beta1 kind: Deployment metadata:
我正在寻找从 kubernetes 中的 pod 捕获日志以用于两个用例: 实时 -> 我正在使用 kubectl logs ---现在 非实时 -> 使用 stackdriver用管道传送到 big
我已经在Google云中创建了具有以下规范的节点端口服务...我创建了防火墙规则,以允许端口'30100'的流量从0.0.0.0/0开始,我已经验证了堆栈驱动程序日志,并且在发生流量时我使用curl或
我注意到我在GKE上部署的服务有些奇怪,我想了解... 当我启动kubectl get services时,我可以看到我的服务EXTRNAL-IP。假设35.189.192.88。那就是我用来访问我的
我最近在优化集群 (GKE) 利用率,两天前我注意到我的节点没有扩大或缩小。自动缩放配置映射处于初始化模式: kubectl describe -n kube-system configmap clu
目前,我可以从GoogleCloudPlatform管理控制台屏幕上获取各种信息,但是将来我希望使用API来获取信息。 获得的信息如下。 Kubernetes Engine>Clusters>Cl
我正在尝试在 GKE 上设置我的应用程序并使用内部负载均衡器进行公共(public)访问。我能够毫无问题地部署集群/负载均衡器服务,但是当我尝试访问负载均衡器的外部 IP 地址时,我得到连接被拒绝,我
默认情况下,可从同一集群访问ClusterIP类型的Kubernetes服务。是否可以将GKE中的服务配置为可从同一VPC访问?例如,同一VPC中的GCE VM可以访问GKE中的服务,但我不想将其公开
GKE 使用 kubenet用于在 VPC 中设置容器接口(interface)和配置路由的网络插件,以便容器可以在不同主机上相互访问。 维基百科定义了一个 overlay作为建立在另一个网络之上的计
首先对于我的问题,我需要谈谈我的环境: Google 基本设置:1x f1-micro 实例,3 个节点 Kubernetes 设置:nginx-ingress-controller、cert-man
我是一名优秀的程序员,十分优秀!