不是有效的图表存储库或无法访问:无法获取https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden
helm init 今天开始失败,我们HELM_VERSION: v2.13.0
在 CI/CD中使用 helm 版本。
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Error: Looks like "https://kubernetes-charts.storage.googleapis.com"
is not a valid chart repository or cannot be reached:
Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden
Run Code Online (Sandbox Code Playgroud)
虽然一天前它工作正常。这是我在运行init
命令时收到的日志。
$ helm init --client-only
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Error: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository …
Run Code Online (Sandbox Code Playgroud) 我试过pm2来限制重启限制--max-restarts
但是它不起作用而且累了min_uptime
sudo pm2 start server.js --max-restarts=5
Run Code Online (Sandbox Code Playgroud)
我也试过yml
文件
apps:
- name: node-mt
script: server-socket.js
watch: true
max_restarts: 5
min_uptime: 5000
Run Code Online (Sandbox Code Playgroud)
但它并不限制应用程序的重启.
如果pm2经常崩溃,它会导致主机系统崩溃,内存使用量从300mb到800mb.
应用程序运行时的正常状态.
当应用程序崩溃时.然后图表非常高.
我配置了一个包含 3 个实例 (m5.large) 的 AWS ECS 集群,每个可用区(A、B 和 C)各有一个实例。该服务配置如下:
在任务定义中,我使用了以下内容:
在容器级别,我仅配置了内存软限制:
我使用 awslogs 进行日志记录。上述配置有效,当我启动服务时,每个实例中都会运行一个 docker。其中一个实例中的“docker stats”显示以下内容:
MEM USAGE / LIMIT
230MiB / 7.501GiB
Run Code Online (Sandbox Code Playgroud)
容器实例(ECS控制台)显示如下:
Resources Registered Available
CPU 2048 2048
Memory 7680 5632
Ports 5 ports
Run Code Online (Sandbox Code Playgroud)
上述结果在所有 3 个实例中都是相同的 - 已预留 2 GB 内存(软限制),内存上限为近 8 GB 的实例内存(未设置硬限制)。到目前为止,一切都按预期进行。
但是当我从 Jenkins 重新部署代码(使用强制部署)时,我在 Jenkins 日志中收到以下错误:
"message": "(service App-V1-Service) was unable to place a task because no container instance met …
Run Code Online (Sandbox Code Playgroud) 我想知道我们如何停止和重新启动使用 terraform 创建的 AWS ec2 实例。有没有办法做到这一点?
尝试 bash 进入容器并执行 for 循环,该循环仅执行一个命令(顺便说一下,该命令适用于单个文件)。它甚至似乎呼应了正确的命令......我忘记了什么无题
for pdf in *.pdf ;
do
docker run --rm -v "$(pwd):/home/docker" leofcardoso/pdf2pdfocr -g jpeg2000 -v -i '\'''$pdf''\''';
done
Run Code Online (Sandbox Code Playgroud) 我想创建一个 lambda 函数,每当创建新的 EC2 实例时都会触发该函数,此 Lambda 函数应自动在此新实例上配置 StatusCheck 警报。这样我就不必在每次创建新实例时手动配置 cloudwatch 警报。有人可以帮助编写完成此任务的 lambda 函数代码吗?
我有这样的事情:
response = client.put_metric_alarm(
AlarmName='StatusCheckFailed-Alarm-for-i-1234567890abcdef0',
AlarmActions=[
'arn:aws:sns:us-west-2:111122223333:my-sns-topic',
],
MetricName='StatusCheckFailed',
Namespace='AWS/EC2',
Statistic='Maximum',
Dimensions=[
{
'Name': 'InstanceId',
'Value': 'i-1234567890abcdef0'
},
],
Period=300,
Unit='Count',
EvaluationPeriods=2,
Threshold=1,
ComparisonOperator='GreaterThanOrEqualToThreshold')
Run Code Online (Sandbox Code Playgroud)
但我必须将 cloudwatch 规则中的实例 ID 作为输入映射到 Lambda。由于该函数会自动触发,因此无法每次手动输入实例 ID。
我想列出 ECR 注册表中的图像,但出现一些错误。有人可以提供解决方案吗?
aws ecr list-images --repository-name <Repository_Name>
Run Code Online (Sandbox Code Playgroud)
下面出现错误
An error occurred (RepositoryNotFoundException) when calling the
ListImages operation: The repository with name '<Repository_Name>' does
not exist in the registry with id 'ID_Name'
Run Code Online (Sandbox Code Playgroud)
注意:我想列出存储库中的所有图像,但我不想使用过滤器列出图像。
我正在寻找一种方法来针对单个 ECS 服务附加两个目标组,在其他情况下,我的容器公开两个端口,但我只能将一个端口针对我的服务映射到 LB。
到目前为止,我能够创建一个新的侦听器和目标组,但在创建目标组后,我可以按照预期看到所有内容,但目标组显示There are no targets registered to this target group
目标组:
resource "aws_lb_target_group" "e_admin" {
name = "${var.env_prefix_name}-admin"
port = 5280
protocol = "HTTP"
vpc_id = "${aws_vpc.VPC.id}"
health_check {
path = "/admin"
healthy_threshold = 2
unhealthy_threshold = 10
port = 5280
timeout = 90
interval = 100
matcher = "401,200"
}
}
Run Code Online (Sandbox Code Playgroud)
听者: '
resource "aws_lb_listener" "admin" {
load_balancer_arn = "${aws_lb.admin_lb.arn}"
port = "5280"
protocol = "HTTP"
default_action {
target_group_arn = "${aws_lb_target_group.e_admin.id}"
type = "forward" …
Run Code Online (Sandbox Code Playgroud) 在 dockerizing mlflow 时,只有 .trash 被创建,因为在 mlflow ui 中,出现“没有实验存在”的错误
dockerfile
FROM python:3.7.0
RUN pip install mlflow==1.0.0
WORKDIR /data
EXPOSE 5000
CMD mlflow server \
--backend-store-uri /data/ \
--default-artifact-root /data/ \
--host 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
码头工人:
mlflow:
# builds track_ml Dockerfile
build:
context: ./mlflow_dockerfile
expose:
- "5000"
ports:
- "5000:5000"
volumes:
- ./data:/data
Run Code Online (Sandbox Code Playgroud) docker ×4
terraform ×3
amazon-ecs ×2
amazon-ecr ×1
automation ×1
aws-cli ×1
aws-lambda ×1
bash ×1
mlflow ×1
node.js ×1
pm2 ×1
terragrunt ×1
ubuntu ×1