Closed
Description
BUG REPORT: (I think?)
What happened:
I ran the following steps on Ubuntu 16.04:
sudo apt-get update
sudo apt-get upgrade
sudo su
kubeadm reset
kubeadm init --token [redacted] --apiserver-advertise-address=192.168.13.1 --pod-network-cidr=10.244.0.0/16
exit
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get nodes
Upon doing this, I receive:
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
I've tried uninstalling kubectl
, kubeadm
and kubelet
a couple of times (even with --purge
) and no matter what I do, it (kubeadm 1.7) doesn't generate a working admin.conf
. However, I run the following:
curl --cacert /etc/kubernetes/pki/ca.crt --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt --key /etc/kubernetes/pki/apiserver-kubelet-client.key https://192.168.13.1:6443
and get:
{
"paths": [
"/api",
"/api/v1",
"/apis",
"/apis/",
"/apis/apiextensions.k8s.io",
"/apis/apiextensions.k8s.io/v1beta1",
"/apis/apiregistration.k8s.io",
"/apis/apiregistration.k8s.io/v1beta1",
"/apis/apps",
"/apis/apps/v1beta1",
"/apis/authentication.k8s.io",
"/apis/authentication.k8s.io/v1",
"/apis/authentication.k8s.io/v1beta1",
"/apis/authorization.k8s.io",
"/apis/authorization.k8s.io/v1",
"/apis/authorization.k8s.io/v1beta1",
"/apis/autoscaling",
"/apis/autoscaling/v1",
"/apis/batch",
"/apis/batch/v1",
"/apis/certificates.k8s.io",
"/apis/certificates.k8s.io/v1beta1",
"/apis/extensions",
"/apis/extensions/v1beta1",
"/apis/networking.k8s.io",
"/apis/networking.k8s.io/v1",
"/apis/policy",
"/apis/policy/v1beta1",
"/apis/rbac.authorization.k8s.io",
"/apis/rbac.authorization.k8s.io/v1alpha1",
"/apis/rbac.authorization.k8s.io/v1beta1",
"/apis/settings.k8s.io",
"/apis/settings.k8s.io/v1alpha1",
"/apis/storage.k8s.io",
"/apis/storage.k8s.io/v1",
"/apis/storage.k8s.io/v1beta1",
"/healthz",
"/healthz/autoregister-completion",
"/healthz/ping",
"/healthz/poststarthook/apiservice-registration-controller",
"/healthz/poststarthook/apiservice-status-available-controller",
"/healthz/poststarthook/bootstrap-controller",
"/healthz/poststarthook/ca-registration",
"/healthz/poststarthook/extensions/third-party-resources",
"/healthz/poststarthook/generic-apiserver-start-informers",
"/healthz/poststarthook/kube-apiserver-autoregistration",
"/healthz/poststarthook/rbac/bootstrap-roles",
"/healthz/poststarthook/start-apiextensions-controllers",
"/healthz/poststarthook/start-apiextensions-informers",
"/healthz/poststarthook/start-kube-aggregator-informers",
"/healthz/poststarthook/start-kube-apiserver-informers",
"/logs",
"/metrics",
"/swagger-2.0.0.json",
"/swagger-2.0.0.pb-v1",
"/swagger-2.0.0.pb-v1.gz",
"/swagger.json",
"/swaggerapi",
"/ui",
"/ui/",
"/version"
]
}
What you expected to happen:
After initializing the master via kubeadm init
, I expected to be able to use kubectl
to install a network plugin; since it x509
's, I cannot do that.
Environment:
- Kubernetes version (use
kubectl version
): 1.7 - OS (e.g. from /etc/os-release): Ubuntu 16.04.2 LTS
- Kernel (e.g.
uname -a
): Linux radium-control 4.4.0-83-generic Move third_party code under third_party/src so it can be used in $GOPATH #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Activity
k8s-github-robot commentedon Jul 1, 2017
@carldanley There are no sig labels on this issue. Please add a sig label by:
(1) mentioning a sig:
@kubernetes/sig-<team-name>-misc
e.g.,
@kubernetes/sig-api-machinery-*
for API Machinery(2) specifying the label manually:
/sig <label>
e.g.,
/sig scalability
for sig/scalabilityNote: method (1) will trigger a notification to the team. You can find the team list here and label list here
carldanley commentedon Jul 1, 2017
/sig cluster-lifecycle
jeffbr13 commentedon Jul 3, 2017
Unsure if this helps, but I had the same and realised I was using the old setup guide, copying
/etc/kubernetes/admin.conf
into~/.kube/admin.conf
and setting$KUBECONFIG=$HOME/.kube/admin.conf
. I cleared the environment variable andkubectl
defaults back to using~/.kube/config
.ConorNevin commentedon Jul 5, 2017
I'm also seeing this using kubeadm v1.7 - it's preventing nodes from joining the cluster
nlamirault commentedon Jul 17, 2017
Same error for my installation. Try with v1.6.5 and 1.6.7 it works fine.
byungnam commentedon Aug 8, 2017
Same problem here.
.
(
kubeadm init
seems okay)(
kubeadm join
seems okay, too)(but
kubectl get nodes
fails)liggitt commentedon Aug 8, 2017
do you have
$KUBECONFIG
pointing to/etc/kubernetes/kubelet.conf
?byungnam commentedon Aug 9, 2017
@liggitt After I set the
$KUBECONFIG
to/etc/kubernetes/kubelet.conf
, now it gives me a timeout error.And now I want where the
$KUBECONFIG
came from because there is no such statement in the manual I'm referencing.liggitt commentedon Aug 9, 2017
From the output of the node join command:
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
feiskyer commentedon Aug 9, 2017
Encountered same problem while playing with kubeadm.
After
kubeadm init
andkubeadm reset
for a few times, kubelet will fail communicating with apiserver becausecertificate signed by unknown authority
(in kubelet logs). And alsokubeadm init
blocks for ever.After removing
/run/kubernetes/
manually, all things come back. Maybe there are problems of cleaning certificates when runningkubeadm reset
?feiskyer commentedon Aug 9, 2017
/area kubeadm
24 remaining items