2015-12-18 24 views
5

Sto tentando di installare kubernetes su ubutnu (installazione bare metal). Installo un master e un nodo e sembra a posto. Ho installato il componente aggiuntivo ui senza problemi, ma quando ho provato ad installare il dns addon il pod si riavvia continuamente.Impossibile avviare skydns

nei registri Kube-apiserver ottengo:

E1218 12:56:15.298118  5 handlers.go:37] Unable to authenticate the request due to an error: crypto/rsa: verification error 
I1218 12:56:15.298220  5 handlers.go:131] GET /api/v1/services: (534.467µs) 401 [[kube2sky/v0.20.2 (linux/amd64) kubernetes/unknown] 172.27.35.39:33013] 
E1218 12:56:15.298396  5 handlers.go:37] Unable to authenticate the request due to an error: crypto/rsa: verification error 
I1218 12:56:15.298469  5 handlers.go:131] GET /api/v1/endpoints: (493.5µs) 401 [[kube2sky/v0.20.2 (linux/amd64) kubernetes/unknown] 172.27.35.39:33014] 
I1218 12:56:16.001321  5 handlers.go:131] GET /healthz: (83.326µs) 0 [[Go 1.1 package http] 127.0.0.1:42096] 
E1218 12:56:16.303274  5 handlers.go:37] Unable to authenticate the request due to an error: crypto/rsa: verification error 
E1218 12:56:16.303274  5 handlers.go:37] Unable to authenticate the request due to an error: crypto/rsa: verification error 

E nel contenitore kube2sky login ottengo i seguenti errori:

E1218 12:57:51.713651  1 reflector.go:136] Failed to list *api.Service: the server has asked for the client to provide credentials (get services) 
E1218 12:57:51.713850  1 reflector.go:136] Failed to list *api.Endpoints: the server has asked for the client to provide credentials (get endpoints) 

Sembra a me come se avessi un problema con account di servizio e token ma ho guardato nell'istanza di kube2sky e vedo che ho un token nella directory /tmp/secrets/kubernetes.io/serviceaccount e il cacr è il ca corretto del cluster

Sto usando: ubuntu 14.04 kubernetes 1.1.2 add cerco di creare l'addon dns dalla directory addon di kubernetes 1.1.2

+0

Ho installato kubernetes hai avuto esattamente stesso. Si prega di verificare mountPath nel contenitore kube2sky. Sto usando volumeMounts per token come segue. "volumeMounts": [{ "name": "default-token-npk63", "readOnly": true, "MountPath": "/var/run/secrets/kubernetes.io/serviceaccount" } ] , – jeon

risposta

0

come ho scoperto che non è questione con skydns, ma piuttosto con kubernetes stessa. Se metto questo rc/servizio in uno spazio dei nomi diverso funziona perfettamente. Ho avuto questo problema con 1.1.4 Kubernetes

6

Ho avuto questo stesso problema dopo aver aggiornato il certificato e la chiave dell'API-server. Ho sistemato il servizio DNS dopo aver rimosso il segreto:

# Search the secret name 
kubectl get pod --namespace=kube-system -l k8s-app=kube-dns -o yaml | grep -A1 serviceaccount 

# Delete the current secret 
kubectl delete secret/<name-of-the-secret> --namespace=kube-system 

Ho anche bisogno di riavviare l'intero POD, non so se v'è un approccio migliore:

kubectl delete svc/kube-dns rc/kube-dns-v9 --namespace=kube-system 
kubectl create -f dns-addon.yaml 
Problemi correlati