
上QQ阅读APP看书,第一时间看更新
Installing the command-line tools to configure Alibaba Cloud services
For this recipe, we will use the Alibaba Cloud console and generate the API request parameters from the dashboard that will be used with the CLI. You will also need the Alibaba Cloud CLI, aliyun, and kubectl installed.
- Run the following command to download the aliyun tool:
$ curl -O https://aliyuncli.alicdn.com/aliyun-cli-linux-3.0.15-amd64.tgz
You can find the link to the latest version here: https://github.com/aliyun/aliyun-cli.
- Extract the files and install them:
$ tar –zxvf aliyun-cli*.tgz && sudo mv aliyun /usr/local/bin/.
- Verify the aliyun CLI version you're using:
$ aliyun --version
- If you haven't created an AccessKey, go to Security Management in your account and create one (https://usercenter.console.aliyun.com/#/manage/ak).
- Complete the CLI configuration by entering your AccessKey ID, AccessKey Secret, and region ID:
$ aliyun configure
Configuring profile '' in '' authenticate mode...
Access Key Id []: <Your AccessKey ID>
Access Key Secret []: <Your AccessKey Secret>
Default Region Id []: us-west-1
Default Output Format [json]: json (Only support json))
Default Language [zh|en] en: en
Saving profile[] ...Done.
- Enable bash/zsh autocompletion:
$ aliyun auto-completion
- Go to the Container Service console (https://cs.console.aliyun.com) to give permissions to the container service to access cloud resources. Here, select AliyunCSDefaultRole, AliyunCSServerlessKuberentesRole, AliyunCSClusterRole, and AliyunCSManagedKubernetesRole and click on Confirm Authorization Policy.
Make sure you have the Resource Orchestration Service (ROS) and Autoscaling services enabled since they are required to get Kubernetes clusters deployed. ROS is used to automatically provision and configure resources for auto-deployment, operation, and maintenance based on your template, while Autoscaling is used to adjust compute resources based on demand.