【发布时间】:2019-07-09 15:27:20
【问题描述】:
我使用 terraform 创建了 EKS Kubernetes 集群。一切顺利,创建了集群,并且上面有一台 EC2 机器。但是,我无法在那里初始化 helm 并安装 Tiller。所有代码都在https://github.com/amorfis/aws-eks-terraform
如 README.md 中所述,集群创建后我更新 ~/.kube/config,创建 rbac,并尝试初始化 helm。但是,它的 pod 仍在等待中:
$> kubectl --namespace kube-system get pods
NAME READY STATUS RESTARTS AGE
coredns-7554568866-8mnsm 0/1 Pending 0 3h
coredns-7554568866-mng65 0/1 Pending 0 3h
tiller-deploy-77c96688d7-87rb8 0/1 Pending 0 1h
以及其他 2 个coredns pod。
我错过了什么?
更新:describe 的输出:
$> kubectl describe pod tiller-deploy-77c96688d7-87rb8 --namespace kube-system
Name: tiller-deploy-77c96688d7-87rb8
Namespace: kube-system
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app=helm
name=tiller
pod-template-hash=3375224483
Annotations: <none>
Status: Pending
IP:
Controlled By: ReplicaSet/tiller-deploy-77c96688d7
Containers:
tiller:
Image: gcr.io/kubernetes-helm/tiller:v2.12.2
Ports: 44134/TCP, 44135/TCP
Host Ports: 0/TCP, 0/TCP
Liveness: http-get http://:44135/liveness delay=1s timeout=1s period=10s #success=1 #failure=3
Readiness: http-get http://:44135/readiness delay=1s timeout=1s period=10s #success=1 #failure=3
Environment:
TILLER_NAMESPACE: kube-system
TILLER_HISTORY_MAX: 0
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from tiller-token-b9x6d (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
tiller-token-b9x6d:
Type: Secret (a volume populated by a Secret)
SecretName: tiller-token-b9x6d
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events: <none>
【问题讨论】:
-
嗨,你可以运行
kubectl describe pod tiller-deploy-77c96688d7-87rb8吗? -
也没有节点,这很奇怪,因为在AWS上创建了一个EC2实例。
-
大声笑,如果没有节点,那么它将处于挂起状态
-
但是为什么没有节点呢?我该怎么做才能吃到一些?
-
如果有创建节点的api调用需要查看terraform的日志
标签: kubernetes amazon-eks