我正在尝试通过kops创建一个集群,遵循以下说明https://github.com/kubernetes/kops/blob/master/docs/cli/kops_create_cluster.md
这就是我尝试过的
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
export KOPS_CLUSTER_NAME=staging.fayzlab.com
export KOPS_STATE_STORE=s3://fayzlab-kops-stat-store
aws s3api create-bucket \
--bucket fayzlab-kops-stat-store \
--region us-east-1
aws s3api put-bucket-versioning --bucket fayzlab-kops-stat-store --versioning-configuration Status=Enabled
kops create cluster \
--zones us-east-1b \
--topology private \
--networking calico \
--api-ssl-certificate arn:aws:acm:us-east-1:679995182974:certificate/b1753864-f1b7-4a51-a008-cb14f07544ab \
--master-size t2.micro\
--master-count 1 \
--node-size t2.micro \
--node-count 1 \
--name ${KOPS_CLUSTER_NAME}我得到了以下输出
{
"Location": "/fayzlab-kops-stat-store"
}
I0329 17:58:56.299037 32539 create_cluster.go:496] Inferred --cloud=aws from zone "us-east-1b"
I0329 17:58:57.216939 32539 subnets.go:184] Assigned CIDR 172.20.32.0/19 to subnet us-east-1b
I0329 17:58:57.217040 32539 subnets.go:198] Assigned CIDR 172.20.0.0/22 to subnet utility-us-east-1b
Previewing changes that will be made:
SSH public key must be specified when running with AWS (create with `kops create secret --name staging.fayzlab.com sshpublickey admin -i ~/.ssh/id_rsa.pub`)我创建了一个密钥ssh-keygen -t rsa -f ./cluster.fayzlab.com
并尝试
kops create secret sshpublickey admin -i ~/.ssh/cluster.fayzlab.com.pub \
--name staging.fayzlab.com --state s3://fayzlab-kops-stat-store但是我得到了这个错误
error reading SSH public key /home/faiz/.ssh/cluster.fayzlab.com.pub: open /home/faiz/.ssh/cluster.fayzlab.com.pub: permission denied我已经在网上用尽了我所有的选择和资源。请给我建议。
文件上的权限
-rw------- 1 faiz faiz 1766 Mar 29 17:51 cluster.fayzlab.com
-rw-r--r-- 1 faiz faiz 391 Mar 29 17:51 cluster.fayzlab.com.pub发布于 2019-04-09 21:15:38
选项I
1)修改工作目录为
cd ~/.ssh/2)并再次运行命令,如下所示
kops create secret sshpublickey admin -i cluster.fayzlab.com.pub --name staging.fayzlab.com --state s3://fayzlab-kops-stat-store选项II
提供公钥的完整路径,即
kops create secret sshpublickey admin -i /home/faiz/.ssh/cluster.fayzlab.com.pub --name staging.fayzlab.com --state s3://fayzlab-kops-stat-storehttps://stackoverflow.com/questions/55419161
复制相似问题