【发布时间】:2020-03-24 15:59:38
【问题描述】:
我正在尝试在 AWS EKS 上设置 aws-iam-authenticator 容器,但我已经被困了好几个小时才能启动守护程序。我按照aws-iam-authenticator repo 上的说明进行操作,并使用deploy/example.yml 作为我的参考起点。我已经修改了角色、clusterID 和其他必需的组件,但在应用部署后仍然没有运气。
我刚刚为控制器主控启用了日志记录,所以我希望那里可能有更多详细信息。我还看到一篇帖子,人们提到重新启动控制器节点,但我还没有找到使用 EKS 的方法。
如果有人有快速提示或其他地方可以检查,我将不胜感激:)
$ kubectl get ds -n kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
aws-iam-authenticator 0 0 0 0 0 node-role.kubernetes.io/master= 8h
aws-node 3 3 3 3 3 <none> 3d22h
kube-proxy 3 3 3 3 3 <none> 3d22h
附加输出
$ kubectl get ds aws-iam-authenticator -n kube-system --output=yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"DaemonSet","metadata":{"annotations":{},"labels":{"k8s-app":"aws-iam-authenticator"},"name":"aws-iam-authenticator","namespace":"kube-system"},"spec":{"selector":{"matchLabels":{"k8s-app":"aws-iam-authenticator"}},"template":{"metadata":{"annotations":{"scheduler.alpha.kubernetes.io/critical-pod":""},"labels":{"k8s-app":"aws-iam-authenticator"}},"spec":{"containers":[{"args":["server","--config=/etc/aws-iam-authenticator/config.yaml","--state-dir=/var/aws-iam-authenticator","--generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml"],"image":"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.4.0","name":"aws-iam-authenticator","resources":{"limits":{"cpu":"100m","memory":"20Mi"},"requests":{"cpu":"10m","memory":"20Mi"}},"volumeMounts":[{"mountPath":"/etc/aws-iam-authenticator/","name":"config"},{"mountPath":"/var/aws-iam-authenticator/","name":"state"},{"mountPath":"/etc/kubernetes/aws-iam-authenticator/","name":"output"}]}],"hostNetwork":true,"nodeSelector":{"node-role.kubernetes.io/master":""},"serviceAccountName":"aws-iam-authenticator","tolerations":[{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"},{"key":"CriticalAddonsOnly","operator":"Exists"}],"volumes":[{"configMap":{"name":"aws-iam-authenticator"},"name":"config"},{"hostPath":{"path":"/etc/kubernetes/aws-iam-authenticator/"},"name":"output"},{"hostPath":{"path":"/var/aws-iam-authenticator/"},"name":"state"}]}},"updateStrategy":{"type":"RollingUpdate"}}}
creationTimestamp: "2020-03-24T06:47:54Z"
generation: 4
labels:
k8s-app: aws-iam-authenticator
name: aws-iam-authenticator
namespace: kube-system
resourceVersion: "601895"
selfLink: /apis/extensions/v1beta1/namespaces/kube-system/daemonsets/aws-iam-authenticator
uid: 63e8985a-54cc-49a8-b343-3e20b4d9eaff
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: aws-iam-authenticator
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
creationTimestamp: null
labels:
k8s-app: aws-iam-authenticator
spec:
containers:
- args:
- server
- --config=/etc/aws-iam-authenticator/config.yaml
- --state-dir=/var/aws-iam-authenticator
- --generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.4.0
imagePullPolicy: IfNotPresent
name: aws-iam-authenticator
resources:
limits:
cpu: 100m
memory: 20Mi
requests:
cpu: 10m
memory: 20Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/aws-iam-authenticator/
name: config
- mountPath: /var/aws-iam-authenticator/
name: state
- mountPath: /etc/kubernetes/aws-iam-authenticator/
name: output
dnsPolicy: ClusterFirst
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/master: ""
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: aws-iam-authenticator
serviceAccountName: aws-iam-authenticator
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- key: CriticalAddonsOnly
operator: Exists
volumes:
- configMap:
defaultMode: 420
name: aws-iam-authenticator
name: config
- hostPath:
path: /etc/kubernetes/aws-iam-authenticator/
type: ""
name: output
- hostPath:
path: /var/aws-iam-authenticator/
type: ""
name: state
templateGeneration: 4
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
status:
currentNumberScheduled: 0
desiredNumberScheduled: 0
numberMisscheduled: 0
numberReady: 0
observedGeneration: 4
【问题讨论】:
-
你能描述守护进程并添加输出...还有 kubectl get events
-
我有一种预感,这可能是由于
nodeSelector规范。尝试删除它,看看他们是否被安排。 -
@PoweredByOrange 我之前在看这个,果然评论它带来了豆荚!如果您可以将其移至回复,我将接受此答案:)。如果条目就像任何节点的通配符,知道为什么会导致问题吗?旁注,我遇到了 CrashLoopBack 错误,但我会单独解决这个问题,因为这应该“更容易”找到
标签: amazon-web-services kubernetes amazon-eks aws-iam-authenticator