我正在尝试在 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
我读过几篇关于 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 做一些特别的事情才能正确报告覆盖范围吗?
我正在构建一个 cloudformation 模板来在 AWS 上运行 ECS 集群和 ECS 任务。
我还使用带有插件 Cfn-Lint 的 Atom 文本编辑器。
我在 Atom 文本编辑器中的 cfn linter 验证中面临以下问题,如图所示。
分享一些代码片段
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
我正在使用下面的代码片段来S3 Bucket
配置Cloudformation
我想要Retain
S3 存储桶,因此使用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
属性存在
我应该如何解决这个问题?
提前致谢。
我正在使用 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 并更新其版本,但问题仍然存在。
如何调试问题并解决问题?
kubernetes ×2
amazon-ebs ×1
amazon-ecs ×1
amazon-eks ×1
amazon-s3 ×1
atom-editor ×1
jacoco ×1
java ×1
java-8 ×1
lambda ×1