我是Kubernetes的新手,正在尝试在AWS上创建集群。我无法运行<html lang="en" class="no-js">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="assest/css/styles.css">
<!-- javascript files -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script type="text/javascript" src="assest/js/main.js"></script>
<!-- end imported files -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>title</title>
</head>
<body>
命令并无法连接服务器:EOF
在过去的两天里,我一直在尝试各种论坛和帮助,但不确定丢失了什么。
步骤:
我启动了一个t2.micro Ubuntu EC2实例。
以下是所安装软件的详细信息:
kubectl
我在定义AWS Access密钥/私有密钥和S3存储桶之后创建集群:
$ kops version
Version 1.10.0 (git-8b52ea6d1)
$ aws --version
aws-cli/1.16.43 Python/3.6.6 Linux/4.15.0-1021-aws botocore/1.12.33
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2",
GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean",
BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc",
Platform:"linux/amd64"}
Unable to connect to the server: EOF
我得到以下输出:
$ kops create cluster clusters.k8s.local --zones us-east-1a --ssh-public-key kubernetes.pub --yes
我看到在我的S3存储桶下创建了clusters.k8s.local。
$ kops create cluster clusters.k8s.local --zones us-east-1a --ssh-public-key kubernetes.pub --yes
I1028 15:07:44.695579 10142 create_cluster.go:1351] Using SSH public key: kubernetes.pub
I1028 15:07:45.604469 10142 create_cluster.go:480] Inferred --cloud=aws from zone "us-east-1a"
I1028 15:07:46.037436 10142 subnets.go:184] Assigned CIDR 172.20.32.0/19 to subnet us-east-1a
I1028 15:07:49.847838 10142 apply_cluster.go:505] Gossip DNS: skipping DNS validation
I1028 15:07:50.474329 10142 executor.go:103] Tasks: 0 done / 77 total; 30 can run
I1028 15:07:51.670973 10142 vfs_castore.go:735] Issuing new certificate: "apiserver-aggregator-ca"
I1028 15:07:51.819791 10142 vfs_castore.go:735] Issuing new certificate: "ca"
I1028 15:07:52.756166 10142 executor.go:103] Tasks: 30 done / 77 total; 24 can run
I1028 15:07:54.645080 10142 vfs_castore.go:735] Issuing new certificate: "apiserver-proxy-client"
I1028 15:07:55.018900 10142 vfs_castore.go:735] Issuing new certificate: "apiserver-aggregator"
I1028 15:07:55.250726 10142 vfs_castore.go:735] Issuing new certificate: "kube-proxy"
I1028 15:07:55.295112 10142 vfs_castore.go:735] Issuing new certificate: "kube-scheduler"
I1028 15:07:55.381353 10142 vfs_castore.go:735] Issuing new certificate: "kube-controller-manager"
I1028 15:07:55.646626 10142 vfs_castore.go:735] Issuing new certificate: "kops"
I1028 15:07:56.694727 10142 vfs_castore.go:735] Issuing new certificate: "kubecfg"
I1028 15:07:56.837301 10142 vfs_castore.go:735] Issuing new certificate: "kubelet-api"
I1028 15:07:56.955183 10142 vfs_castore.go:735] Issuing new certificate: "kubelet"
I1028 15:07:57.546052 10142 executor.go:103] Tasks: 54 done / 77 total; 19 can run
I1028 15:07:59.426632 10142 executor.go:103] Tasks: 73 done / 77 total; 3 can run
I1028 15:08:00.563120 10142 vfs_castore.go:735] Issuing new certificate: "master"
I1028 15:08:01.146029 10142 executor.go:103] Tasks: 76 done / 77 total; 1 can run
I1028 15:08:01.784444 10142 executor.go:103] Tasks: 77 done / 77 total; 0 can run
I1028 15:08:01.937677 10142 update_cluster.go:290] Exporting kubecfg for cluster
kops has set your kubectl context to clusters.k8s.local
Cluster is starting. It should be ready in a few minutes.
Suggestions:
* validate cluster: kops validate cluster
* list nodes: kubectl get nodes --show-labels
* ssh to the master: ssh -i ~/.ssh/id_rsa admin@api.clusters.k8s.local
* the admin user is specific to Debian. If not using Debian please use the appropriate user based on your OS.
* read about installing addons at: https://github.com/kubernetes/kops/blob/master/docs/addons.md.
验证kops集群:
$ kubectl cluster-info
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: EOF
当我运行nslookup命令时:
$ kops validate cluster
Using cluster from kubectl context: clusters.k8s.local
Validating cluster clusters.k8s.local
unexpected error during validation: error listing nodes: Get https://api-clusters-k8s-local-k5ptn2-2092608752.us-east-1.elb.amazonaws.com/api/v1/nodes: EOF