- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在运行一个区域性 GKE 集群,并希望迁移到一个新的区域性集群。旧集群有一个带有公共(public) IP 的入口对象,使用谷歌托管证书来终止 HTTPS。
我的迁移计划是:
kubectl apply -f clusterConfig.yaml
. 最佳答案
在我的实验室帐户中进行了一些研究和测试之后,我将解释如何在许多 LoadBalancer 中重用/重新分配当前的 ManagedCertificate。
如前所述here :
When your domain resolves to IP addresses of multiple load balancers (multiple Ingresses), you should create a single ManagedCertificate resource and attach it to all the Ingresses. If you instead create many ManagedCertificate resources and attach each of them to a separate Ingress, the Certificate Authority may not be able to verify the ownership of your domain and some of your certificates may not be provisioned
ManagedCertified
和一个入口。
ManagedCertificate
的入口。 :
gcloud compute addresses create newip --global
gcloud compute addresses describe newip --global
address: 34.107.xxx.xxx
...
echo-server
部署:
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo
spec:
selector:
matchLabels:
app: echo
template:
metadata:
labels:
app: echo
spec:
containers:
- name: echo
image: mendhak/http-https-echo
ports:
- name: http
containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: echo-svc
spec:
type: NodePort
selector:
app: echo
ports:
- protocol: TCP
port: 80
targetPort: 80
ingress.gcp.kubernetes.io/pre-shared-cert
中获取值
从旧入口 , 并配置注解
kubernetes.io/ingress.global-static-ip-name
与
新ip
kubectl get ing old-ingress -oyaml
获取上一个集群的 key 。
Managed Certificates communicate with Ingress using the
kubernetes.io/pre-shared-cert
annotation.
ingress.gcp.kubernetes.io/pre-shared-cert: Use this annotation to reference the certificates and keys
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-new-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: newip #new ip name
ingress.gcp.kubernetes.io/pre-shared-cert: mcrt-a798051f-a50d-4b38-84b1-xxxxxxxxxxxx # from the old ingress
spec:
rules:
- http:
paths:
- backend:
serviceName: echo-svc
servicePort: 80
path: /
kubectl get ing
验证是否一切正常并尝试 curl ip(SSL 将不匹配,因为您正在使用 ip)
curl -IL -k 34.107.xxx.xxx
HTTP/2 200
x-powered-by: Express
content-type: application/json; charset=utf-8
content-length: 647
etag: W/"287-qCxPIULxqrMga5xHN8AAKMHsUi4"
date: Wed, 20 May 2020 11:49:14 GMT
via: 1.1 google
alt-svc: clear
关于google-kubernetes-engine - 如何在不停机的情况下将 ManagedCertificates 从区域性 GKE 集群迁移到区域性 GKE 集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61794789/
kubectl drain首先是否确保带有replicas=1的Pod在其他某个节点上是健康的? 假设Pod由部署控制,并且Pod确实可以移动到其他节点。 目前,如我所见,它仅从节点逐出(删除Pod)
在上一篇文章 STM8单片机低功耗—等待(Wait)模式实现 中介绍了低功耗模式中的等待(Wait)模式代码实现方法,这篇文章就来演示一下 停机(Halt)模式的代码实现。 停机(Halt)模式的进入
默认情况下,AWS 使用 LATEST更新了最新 lambda 版本的别名,我假设执行以下步骤。 现在,LATEST别名点版本 5。 用户部署新版本的 lambda。 部署新版本时,LATEST别名仍
情况 App Engine Flex 上的自定义运行时(Docker/Node) 当我们自己管理资源时手动扩展到 1 个单个实例(2 cpu/6 gb ram) 配置了活性和就绪检查 正如预期的那样,
我是一名优秀的程序员,十分优秀!