如何在IBM Cloud Private(ICP)中为主节点提供RESTful端点?

时间:2017-09-22 10:37:54

标签: ibm-cloud-private

到目前为止(v2.1 Beta)解决方案是:

1)转到右上角,然后点击用户个人资料(例如管理员) 2)菜单将展开4个选项:注销,更改密码,配置客户端和关于 3)单击“配置客户端”,它将显示4-5个kubectl调用的对话框,其中包括用户特定的令牌等。
4)将该文本复制并粘贴到命令行终端,然后按Enter键。

然后你就应该全力以赴。如果您遇到一个空白对话框,然后刷新整个浏览器页面并再试一次,它将填充。

但是,我想知道是否有人找到了更好的方法吗?

2 个答案:

答案 0 :(得分:0)

使用ICp 2.1 beta,用户实际上可以从App Center安装应用程序,该应用程序为kubectl,helm和calicoctl提供Web终端,详细步骤如下: 1. install `local-charts/web-terminal` from App center 2. go to Workload->Application->default-web-terminal-web 3. click to open the Endpoint page 4. admin/admin as credential

答案 1 :(得分:0)

在2.1.0 Beta3中,第一版命令行工具可用于IBM Cloud Private。

这些工具可以通过"工具>安装在您选择的平台上。命令行" webconsole中的选项。

bx pr login -a https://mycluster.icp:8443 -u admin --skip-ssl-validation
Login method invokedAPI endpoint: https://mycluster.icp:8443

Password> 
Authenticating...
OK

Select an account:
1. ICP Account (9335b8949793c6fb1b96cf2a103a9d50)
Enter a number> 1
Targeted account: ICP Account (9335b8949793c6fb1b96cf2a103a9d50)

bx pr clusters
OK
Name        ID                                 State      Created                    Masters   Workers   Datacenter   
mycluster   00000000000000000000000000000001   deployed   2017-10-13T03:28:53+0000   1         3         default   

bx pr cluster-config mycluster
Configuring kubectl: /Users/mdelder/.bluemix/plugins/icp/clusters/mycluster/kube-config
Cluster "master.cfc" set.
Context "master.cfc-context" set.
User "master.cfc-user" set.
Context "master.cfc-context" set.
Switched to context "master.cfc-context".

OK
Cluster mycluster configured successfully.

现在您可以使用kubectl

kubectl get nodes
NAME          STATUS    AGE       VERSION
10.10.25.27   Ready     2d        v1.7.3-7+154699da4767fd
10.10.25.28   Ready     2d        v1.7.3-7+154699da4767fd
10.10.25.72   Ready     2d        v1.7.3-7+154699da4767fd
10.10.25.73   Ready     2d        v1.7.3-7+154699da4767fd

您还可以发现有关群集的信息:

bx pr help

NAME:
   bx pr - IBM Cloud Private Service.
USAGE:
   bx pr command [arguments...] [command options]

COMMANDS:
   api                View or set the API endpoint and API version for the service.
   cluster-config     Download the Kubernetes configuration and configure kubectl for a specified cluster.
   cluster-get        View details for a cluster.
   clusters           List all the clusters in your account.
   init               Initialize the IBM Cloud Private plugin with the API endpoint.
   load-helm-chart    Loads a Helm chart archive to an IBM Cloud Private cluster.
   load-ppa-archive   Load Docker images and Helm charts compressed file that you downloaded from Passport Advantage.
   login              Log user in.
   master-get         View the details about a master node.
   masters            List all master nodes in an existing cluster.
   worker-get         View the details about a worker node.
   workers            List all worker nodes in an existing cluster.
   help               

Enter 'bx pr help [command]' for more information about a command.

bx pr masters mycluster
OK
ID                      Public IP     Private IP    State   
mycluster-00000000-m1   10.10.25.73   10.10.25.73   deployed