Git Product home page Git Product logo

ack-set-context's Introduction

Setting context for Kubernetes cluster of Alibaba Cloud Kubernetes Service (ACK)

Use this GitHub Action to set context for Kubernetes cluster of Alibaba Cloud Kubernetes (ACK) or set context for cluster of Alibaba Distributed Cloud Container Platform for Kubernetes (ACK One).

Set the KUBECONFIG environment variable by cluster id for K8s cluster managed by ACK or for ACK One hub cluster.

- uses: aliyun/ack-set-context@v1
  with:
    access-key-id: '<access key id>'
    access-key-secret: '<access key secret>'
    ## optional, supports 'ACK' or 'One', default is 'ACK'
    cluster-type: '<cluster type>'
    ## if cluster-type is 'One', please filling up ACK One Fleet cluster id
    cluster-id: '<cluster id>'

Refer to the action metadata file for details about all the inputs: action.yml

Prerequisite

  1. Get the access-key-id and access-key-secret of Alibaba Cloud and add them as secrets in the GitHub repository.
  2. Please keep permissions of AKSK to be minimized. If cluster-type is 'One', you can refer to Grant permissions to a RAM user to configure AliyunAdcpReadOnlyAccess RAM permissions and RBAC role including admin or dev.

ack-set-context's People

Contributors

denverdino avatar dependabot[bot] avatar ivan-cai avatar mozillazg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ack-set-context's Issues

InvalidAccessKeyId.NotFoundError: code: 404, Specified access key is not found.

`

    - name: Setting context for Kubernetes cluster of Alibaba Cloud Kubernetes Service (ACK)
      uses: aliyun/ack-set-context@v1
      with:
        access-key-id: "${{ secrets.ALIYUN_ACCESS_KEY_ID }}"
        access-key-secret: "${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}"
        cluster-id: "${{ secrets.ALIYUN_K8S_ID }}"

`

Error: Failed to get kubeconfig file for Kubernetes cluster: InvalidAccessKeyId.NotFoundError: code: 404, Specified access key is not found., requestid: 3DF885FD-9B90-5127-94C8-1BEF34EA0DDA

SignatureDoesNotMatchError

重复更换AccessKey Id和Secret确认没有错误,授权也配置了,Action出现如下错误

Retrying after 1000ms...
Retrying after 2000ms...
Retrying after 4000ms...
Error: Failed to get kubeconfig file for Kubernetes cluster: SignatureDoesNotMatchError: code: 400, Specified signature is not matched with our calculation. server string to sign is:GET
application/json
1B2M2Y8AsgTpgAmY7PhCfg==

Mon, 17 Jul 20[23](https://github.com/leiyankeji/moti-shop-server/actions/runs/5563008291/jobs/10177162910#step:4:24) 04:31:59 GMT
x-acs-signature-method:HMAC-SHA1
x-acs-signature-nonce:07ac069f1eee93a0828981ca366012c8
x-acs-signature-version:1.0
x-acs-version:2015-12-15
/k8s/ce267ed842bd349[25](https://github.com/leiyankeji/moti-shop-server/actions/runs/5563008291/jobs/10177162910#step:4:26)b82042d656674db4/user_config, requestid: 9A93EA66-52FB-5DBE-8E14-2C4F1[31](https://github.com/leiyankeji/moti-shop-server/actions/runs/5563008291/jobs/10177162910#step:4:32)E4180

阿里云 RAM控制事件如下:
image

Push changes to Aliyun China cluster via helm

Hello,

I'm using this action in an attempt to connect to the my container service cluster in Aliyun

The action itself seems to run fine, but when it comes to using helm to push the charts to the cluster I get the following error (same actions work elsewhere in GCP so don't believe it's an issue with the helm command)

Error: Kubernetes cluster unreachable: Get "https://192.168.0.224:6443/version?timeout=32s": dial tcp 192.168.0.224:6443: i/o timeout

Which to me sounds like the action hasn't actually connected to the cluster?

Any help would be appreciated

Sometimes got `RequestTimeoutError`

We deploy projects to ACK using kubectl in the github action.

I often got this result and requires manual rerun, which may occur once in about ten times:

Failed to get kubeconfig file for Kubernetes cluster: RequestTimeoutError: ReadTimeout(3000). GET https://cs.aliyuncs.com/k8s/cd1d0ffc40b5242b39ddda1864e71e30d/user_config failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.