Yilong Ren 0c33127f38 update README.md
Error response from daemon: pull access denied for registry.aliyuncs.com/acs/ack-image-builder, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

due to "registry.aliyuncs.com/acs/ack-image-builder:v1.0.0" image cannot be downloaded, build it first

Signed-off-by: Yilong Ren <yilong.ryl@alibaba-inc.com>
2020-11-20 11:01:24 +08:00
2019-11-25 10:59:21 +08:00
2020-07-16 17:31:34 +08:00
2020-08-14 16:41:06 +08:00
2020-02-14 18:30:53 +08:00
2019-05-13 20:32:53 +08:00
2020-08-14 16:41:06 +08:00
2020-11-20 11:01:24 +08:00

Image Build Specification of Alibaba Cloud Container Service for Kubernetes (ACK)

Notes: The template ack-centos.json is used for building custom image for ACK cluster based on the latest published ecs centos public image.

This repository contains resources and configuration scripts for building a custom base OS Image for ACK with HashiCorp Packer.

Supported OS

  • CentOS 7.6/7.7
  • Aliyun Linux 2 (Alibaba Cloud Linux 2)

Setup

You must have Packer installed on your local system. For more information, see Installing Packer in the Packer documentation. You must also have Alibaba Cloud account credentials configured so that Packer can make calls to Alibaba Cloud API operations on your behalf.

For more information, see Alibaba Cloud builder in the Packer documentation.

Building the OS Image

Execute following scripts in your shell

export ALICLOUD_ACCESS_KEY=XXX
export ALICLOUD_SECRET_KEY=XXX
packer build examples/ack-centos.json

Building in the kubernetes

make
bash build/build.sh  examples/ack-kubernetes.json

Notes: you need input the follow params:

RAM Policy

If you are using a sub accountthe ram policy should at least include actions as below:

Note that you'd better release the delete permissions once you have completed your image build task for safety reasons.

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeImages",
                "ecs:CreateImage",
                "ecs:ModifyImageSharePermission",
                "ecs:CreateKeyPair",
                "ecs:DeleteKeyPairs",
                "ecs:DetachKeyPair",
                "ecs:AttachKeyPair",
                "ecs:CreateSecurityGroup",
                "ecs:DeleteSecurityGroup",
                "ecs:AuthorizeSecurityGroupEgress",
                "ecs:AuthorizeSecurityGroup",
                "ecs:CreateSnapshot",
                "ecs:AttachDisk",
                "ecs:DetachDisk",
                "ecs:DescribeDisks",
                "ecs:CreateDisk",
                "ecs:DeleteDisk",
                "ecs:CreateNetworkInterface",
                "ecs:DescribeNetworkInterfaces",
                "ecs:AttachNetworkInterface",
                "ecs:DetachNetworkInterface",
                "ecs:DeleteNetworkInterface",
                "ecs:DescribeInstanceAttribute",
                "ecs:CreateInstance",
                "ecs:DeleteInstance",
                "ecs:StartInstance",
                "ecs:StopInstance",
                "ecs:DescribeInstances"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "vpc:CreateVpc",
                "vpc:DeleteVpc",
                "vpc:DescribeVpcs",
                "vpc:CreateVSwitch",
                "vpc:DeleteVSwitch",
                "vpc:DescribeVSwitches",
                "vpc:AllocateEipAddress",
                "vpc:AssociateEipAddress",
                "vpc:UnassociateEipAddress",
                "vpc:DescribeEipAddresses",
                "vpc:ReleaseEipAddress"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        }
    ]
}

Security

For security issues or concerns, please do not open an issue or pull request on GitHub. Please report any suspected or confirmed security issues to Alibaba Cloud Container Security contact kubernetes-security@service.aliyun.com

Description
No description provided
Readme 124 KiB
Languages
Shell 99.4%
Dockerfile 0.4%
Makefile 0.2%