2015-09-09 wcdj
摘要:本文记录使用GCE(Google Container Engine)体验容器云服务的过程和方法。
(1)要申请一个Google账户。
(2)激活Google账单,即绑定支付信用卡,为使用Google的服务买单。激活过程中为了验证信用卡是否可用,需要支付1美元的费用。
激活支付地址:https://console.developers.google.com/billing?_ga=1.62759852.1080048005.1441690490
支付激活后,可以看到能够使用的一些服务,同时看到可以免费使用60天。
(3)激活Google API
激活后,可以使用如下两种服务:
- Google Container Engine API
- Google Compute Engine and associated APIs
创建一个gerry-test-proj工程:
然后点击建立,会自动跳转到当前创建好的工程中:
(4)安装gcloud
The Container Engine API uses the gcloud
command line tool for clusteroperations and for managing credentials.
安装完成后,可以看下gcloud的使用方法:
root@gerryyang:~# gcloud -h
Usage: gcloud [optional flags] <group | command>
group may be auth | components | compute | config | container |
deployment-manager | dns | sql | topic
command may be docker | feedback | help | info | init | version
The *gcloud* CLI manages authentication, local configuration, developer
workflow, and interactions with the Google Cloud Platform APIs.
optional flags:
--account ACCOUNT Google Cloud Platform user account to use for
invocation.
--format FORMAT Format for printed output.
--help Display detailed help.
--log-http LOG_HTTP Logs all HTTP server requests and responses to stderr.
(true/false)
--project PROJECT_ID Google Cloud Platform project ID to use for this
invocation.
--quiet, -q Disable all interactive prompts.
--trace-token TRACE_TOKEN
Token used to route traces of service requests for
investigation of issues.
--user-output-enabled USER_OUTPUT_ENABLED
Control whether user intended output is printed to the
console. (true/false)
--verbosity VERBOSITY Override the default verbosity for this command. This
must be a standard logging verbo