AppEngine(K8s) Command Line Tool

Help

Use ./micli in the command line to display help information

Table of Regions

Region Name
AWS-Beijing cnbj
KSYun-Beijing6 cnbj6
Frankfurt de
Oregon us
Singapore sg

Parameter Introduction

ak -k(--accesskey), for login command, use user key id, obtained from user groups in user management
sk -v(--secretkey), for login command, use user key, obtained from user groups in user management
Xiaomi id -m(--xiaomiId), user id
Region -r(--region), region used
NameSpace -s(--namespace), namespace used
Format -o(--format), uses table output by default, -o json specifies json format output
App name -n(--appname) individual commands require appname, add app name at the end
Replica count -p(--replicaCount), add specified number of replicas at the end
Instance events -e(--events), used for details command, display instance events and operational situation
File path -f(--file), used when creating or updating an application, specifies the application file path

Output color --color specifies the color of the table, currently supported colors are red, green, cyan, yellow, blue, and magenta
Stateful --stateful, default selects stateless app, indicates selection of stateful app
App status sync --sync can be used when creating app and start/stop/restart, for example select sync at start up, cli will wait until all instances are running to return, synchronizing the information for the creation of apps and outputting in tabular form
Timeout --timeout, synchronizing app creation and start/stop/restart, indicates a timeout

Log On Command Line

The log on operation is performed to allow cli to record user's default operations, for example, the user's aksk, the user's default operation region, and the user's default operation namespace
The region and namespace can be reassigned when any command is executed and changed to default attributes.

./micli login -k(--accesskey) xx -v(--secretkey) ${sk} -m(--xiaomiId) ${xiaomiId} -r(--region) ${region} -s(--namespace) ${namespace}

List All Applications

List all the applications under the region and namespace selected by the user. Displayed in tabular format by default. -o json can specify the output json format, -r(--region) is optional, and -s(--namespace) is optional. If no selection is made, the default configuration file is used.

./micli app list

Get Application Details

List the applications details under the region and namespace selected by the user. Displayed in tabular format by default. -o json can specify the output json format, -e(--events) displays the status and events for the application instance, -r(--region) is optional, and -s(--namespace) is optional. If no selection is made, the default configuration file is used.

./micli app detail -n ${appname}

Create an Application

The required parameter -f(--file) specifies the application's json file, --stateful specifies whether the application is stateful, by default the application is stateless, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used, --sync specifies whether to synchronize application creation information, --timeout specifies the timeout for synchronous application creation, -b(--bind) specifies binding automatic scaling policy when creating the application

./micli app create -f ${filepath}

Delete Applications

--stateful specifies whether the application is stateful, by default the application is stateless, -r(--region) is optional, -s(--namespace) is optional, if no selection is made, the default configuration is used

./micli app delete -n ${appname}

Scaling Applications

The scaling application is the number of instances to add to or remove from the application, --stateful specifies whether the application is stateful, by default the application is stateless, p(--replicaCount) is the number of scalings, -r(--region) is optional, and -s(--namespace) is optional. If no selection is made, the default configuration is used

./micli app scale -n ${appname} -p ${count}

Get Application Metrics

The metrics include memory and cpu information for each instance of the application. The required parameter -n specifies the application name. --stateful specifies whether the application is stateful, by default the application is stateless, -r(--region) is optional, and -s(--namespace) is optional, if no selection is made, the default configuration is used

./micli app metric -n ${appname}

Application Grayscale Upgrade

--old specifies the old application name, --new specifies the new application name, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli app grayscale --old ${old_appname} --new ${new_appname}

Application Start/Stop/Restart

Application start/stop/restart specifies starting the application/stopping the application/restarting the application. Restarting the application will maintain the same number of instances as before executing the command --stateful specifies whether the application is stateful, by default the application is stateless, --sync specifies synchronized execution (for example, after specifying synchronized application startup, cli will wait until all instances are running before returning. --timeout specifies synchronization timeout. -r(--region) is optional, and -s(--namespace) is optional, if no selection is made, the default configuration is used

./micli app start -n ${appname} ./micli app stop -n ${appname} ./micli app restart -n ${appname}

Replace Application Image

Parameter -n(--appname) specifies the application name, -i(--image) specifies the name of the mirror to be replaced, --stateful specifies whether the application is stateful, by default the application is stateless, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli app images -n ${appname} --image ${imagename}

Edit Application

Get keywords for application metrics, the required parameter -n specifies the application name, -t(optional) specifies whether the application is stateful, by default the application is stateless. -r(region) is optional, -s(namespace) is optional, if no selection is made, the default configuration is used

./micli app edit -n ${appname}

View Live Logs

Parameter -n(--appname) specifies the application name, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli tail -n ${appname}

List Created Automatic Scaling Policies

List all of the automatic scaling policies under the region and namespace selected by the user. Displayed in tabular format by default.

./micli templet list

Get Automatic Scaling Policies for Applications

Get automatic scaling policies that are bound with the application, parameter -n(--appname) specifies the application name, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli templet detail -n ${appname}

Turn Off Automatic Scaling Policies Specified by App

Turn off scaling policies that are bound to a specific act in similar way to a console, parameter -n(--appname) specifies the application name, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli templet detail -n ${appname}

Automatic Scaling Policies Bound to App

Parameter -n(--appname) specifies the application name, -b(--bind) specifies the policy id, -r(--region), -s(--namespace) specifies the namespace, if no selection is made, the default configuration is used

./micli templet -n ${appname} -b ${templetId}

Applying the Sample JSON File

example-k8s-v2.json

(Chrome: Right click on the link, select "Open Link in new tab"; Firefox: Right-click on the link, select "Save link as ...")

Download Tools

Linux version

k8sCli-linux.zip

Windows version

k8sCli-win.zip

Mac version

k8sCli-mac.zip

(Chrome: Right click on the link, select "Open Link in new tab"; Firefox: Right-click on the link, select "Save link as ...")

results matching ""

    No results matching ""