小编SRJ*_*SRJ的帖子

K8s Pods 故障:为 pod“app”运行“VolumeBinding”预绑定插件时出错:无法绑定卷:等待条件超时

我正在尝试在 AWS EKS 中使用持久卷。

我按照以下链接中提到的所有步骤进行操作

https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/

当我部署示例 Pod 来检查 PVC 是否创建良好时,出现以下错误。

Warning  FailedScheduling  2m6s (x265 over 44h)  default-scheduler  error while running "VolumeBinding" prebind plugin for pod "app": Failed to bind volumes: timed out waiting for the condition
Run Code Online (Sandbox Code Playgroud)

检查了进一步的持久卷声明

kubectl describe pvc
  Warning  ProvisioningFailed    62s (x7 over 3m5s)    ebs.csi.aws.com_ebs-csi-controller-7cb88dcffc-vkvdk_2ae45c3c-b4f2-4200-a5d4-cfdb35a5f0db  failed to provision volume with StorageClass "ebs-sc": rpc error: code = DeadlineExceeded desc = context deadline exceeded
Run Code Online (Sandbox Code Playgroud)

通过查看 ebs csi 控制器的日志

I0721 10:44:10.049138       1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"avengers", Name:"ebs-claim", UID:"88a9684c-1be7-412f-8616-b662eff692df", APIVersion:"v1", ResourceVersion:"19320908", FieldPath:""}): …
Run Code Online (Sandbox Code Playgroud)

amazon-ebs amazon-web-services kubernetes persistent-volumes amazon-eks

7
推荐指数
2
解决办法
3万
查看次数

Jacoco 需要对 Lambdas Java8 进行特殊处理吗?

我读过几篇关于 Jacoco 支持 Lambda 函数的旧文章,问题在几年前就得到了解决。

我发现当我运行 Jacoco 时,它没有报告此代码中 Lambda 函数的覆盖率

        List<SubmissionStatus> result = jdbcTemplate.query(
            FINDALL_SQL,
            (rs, rowNum) -> new SubmissionStatus(
                    rs.getLong("subm_rec_id"),
                    rs.getLong("subm_file_id"),
                    rs.getString("contract_id"),
                    rs.getString("contract_name"),
                    rs.getString("status"))
    );
Run Code Online (Sandbox Code Playgroud)

我知道它受到打击是因为测试无法通过。
我需要为 Jacoco 做一些特别的事情才能正确报告覆盖范围吗?

java lambda java-8 jacoco

6
推荐指数
1
解决办法
3230
查看次数

Cfn-Lint:属性“ExecutionRoleArn”在资源/TaskDefinition/Properties/ExecutionRoleArn/Ref 处没有对资源的有效引用

我正在构建一个 cloudformation 模板来在 AWS 上运行 ECS 集群和 ECS 任务。

我还使用带有插件 Cfn-Lint 的 Atom 文本编辑器。

我在 Atom 文本编辑器中的 cfn linter 验证中面临以下问题,如图所示。

ExecutionRoleArnERRORInClouformation

分享一些代码片段

Resources:
  # A role needed by ECS
  ExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: !Join ['', [!Ref ServiceName, ExecutionRole]]
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service: [ecs-tasks.amazonaws.com]
            Action: ['sts:AssumeRole']
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy'
  TaskDefinition:
    Type: AWS::ECS::TaskDefinition
    # Makes sure the log group is created before it is used.
    Properties:
      # Name of the task definition. Subsequent versions of the task definition are …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-ecs aws-cloudformation atom-editor

4
推荐指数
1
解决办法
1074
查看次数

Cloudformation:在 S3 存储桶上遇到不受支持的属性 DeletionPolicy

我正在使用下面的代码片段来S3 Bucket配置Cloudformation

我想要RetainS3 存储桶,因此使用DeletionPolicy.

Resources:
  S3Bucket:
    Type: 'AWS::S3::Bucket'
    Condition: ShouldCreateS3Bucket
    Properties:
      BucketName: !Ref S3BackupBucketName
      DeletionPolicy: Retain
Run Code Online (Sandbox Code Playgroud)

但是当我部署这个模板时我收到错误

Encountered unsupported property DeletionPolicy
Run Code Online (Sandbox Code Playgroud)

我提到了文档和DeletionPolicy属性存在

我应该如何解决这个问题?

提前致谢。

amazon-s3 amazon-web-services aws-cloudformation

2
推荐指数
1
解决办法
1457
查看次数

k9s:无法连接到 kubernetes 集群

我正在使用 k9s 工具来管理 kubernetes 集群(Google Cloud Platform 上的 GKE)。

最近k9s停止工作并停止连接到k8s集群。

当我启动 k9s(即k9s -n default)时,它会显示所有集群的上下文,当我单击其中一个上下文时

错误是

Unable to connect to context "XXXXXXXXXX"
Run Code Online (Sandbox Code Playgroud)

它向我显示了以下错误,如屏幕截图所示。

在此输入图像描述

但是对于kubectl客户端来说,它工作正常并显示集群的所有数据。

我尝试重新安装 k9s 并更新其版本,但问题仍然存在。

如何调试问题并解决问题?

google-cloud-platform kubernetes

2
推荐指数
1
解决办法
7469
查看次数