我有一个 EKS 集群,我想要: - 每个集群 1 个负载均衡器, - 指向正确命名空间和正确服务的入口规则。
我一直在关注本指南:https : //www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes
我的部署:
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: hello-world
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-world
image: IMAGENAME
ports:
- containerPort: 8000
name: hello-world
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bleble
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: bleble
template:
metadata:
labels:
app: bleble
spec:
containers:
- name: bleble
image: IMAGENAME
ports:
- containerPort: …Run Code Online (Sandbox Code Playgroud) 所以我试图在 Jenkins 中建立一个管道来构建镜像并将它们推送到 Docker 集线器。我在 Manage 'Jenkins' 中的凭据与“docker-hub-credentials”相同,并且似乎已被使用。
它可以构建,但它只是无法通过推送...帮助?我已经做了几个小时了,我不确定我错过了什么。
我已经尝试过使用 docker login,但是 jenkins 不允许。
stage('Build image') {
/* This builds the actual image; synonymous to
* docker build on the command line */
bat 'docker build -t username/foldername:build . ' }
stage('Push image') {
/* Finally, we'll push the image with two tags:
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
bat 'docker push username/foldername:build'
}
}
Run Code Online (Sandbox Code Playgroud)
我希望图像被推送,但我有这个:
The push refers to repository [docker.io/username/foldername]
a73d7d9f4346: Preparing
964bdfb24a54: Preparing
1af124d739c9: Preparing
6cffeea81e5d: Preparing
614a79865f6d: Preparing
612d27bb923f: …Run Code Online (Sandbox Code Playgroud) 我再次需要 Stack Overflow 的帮助:)。
我们有一个新的公共访问端点 EKS Cluster,这是节点内的一个应用程序,可从 RDS 返回某些内容。集群的 VPC 是与保存 RDS 的私有 VPC 对等的 VPC。我们还启用了接受器 DNS解析。接受者是RDS VPC。
当通过 SSH 连接到我的工作节点并远程登录 RDS 时,它就解决了这个问题。最初,连接字符串是与端点建立的。它没有到达数据库。我将其更改为RDS的IP并且它起作用了。
使用 DNS 名称时,需要:
1)大量的时间来加载,
2)
“无法检索错误:超时已过期。从池中获取连接之前超时时间已过。发生这种情况的原因可能是所有池连接都在使用中并且已达到最大池大小。 ”
因此我想知道你们中是否有人遇到过这个问题以及如何解决的?使用 EKS 进行 DNS 解析似乎很有趣,但我不太确定为什么实例可以解析,但 Pod 不能解析。
感谢您的帮助!
我正在尝试在我的集群中实现 pod 的自动缩放。我尝试过“虚拟”部署和 hpa,但没有问题。现在,我正在尝试将它集成到我们的“真正的”微服务中,并且它不断返回
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale True SucceededGetScale the HPA controller was able to get the target's current scale
ScalingActive False FailedGetResourceMetric the HPA was unable to compute the replica count: missing request for memory
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedGetResourceMetric 18m (x5 over 19m) horizontal-pod-autoscaler unable to get metrics for resource memory: no metrics returned from resource metrics API
Warning FailedComputeMetricsReplicas 18m (x5 over …Run Code Online (Sandbox Code Playgroud) 我想在 crontab 中每天运行一些命令:
5 0 * * * docker image prune
5 0 * * * docker image prune -a
5 0 * * * docker container prune
Run Code Online (Sandbox Code Playgroud)
它们似乎并没有真正起作用,因为我的服务器内存随着存储的图像和容器的数量而不断减少。我知道这些命令需要手动干预才能接受 y,我在终端中尝试了 docker image prune -y 但它没有被识别。
有什么建议吗?谢谢!