Error from server (Forbidden): the server does not allow access to the requested resource (post replicationcontrollers)

2,933 views
Skip to first unread message

Caokun (Jack, Platform)

unread,
Mar 17, 2017, 5:52:13 AM3/17/17
to kubernet...@googlegroups.com

Hello experts,

I have the issue on kubernetes

http://stackoverflow.com/questions/42853991/error-from-server-forbidden-the-server-does-not-allow-access-to-the-requested

when run some command ,error occur:

/home/kubernetes/cluster/ubuntu/binaries# ./kubectl version

Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:53:09Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

Error from server (Forbidden): the server does not allow access to the requested resource

/home/kubernetes/cluster/ubuntu/binaries# ./kubectl run helloworld --image=canal-cni:latest --port=8888

Error from server (Forbidden): the server does not allow access to the requested resource (post replicationcontrollers)

 

os information

NAME="Ubuntu"

VERSION="16.04 LTS (Xenial Xerus)"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 16.04 LTS"

VERSION_ID="16.04"

HOME_URL="http://www.ubuntu.com/"

SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

UBUNTU_CODENAME=xenial

 

Linux SZV1000240235 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

install refer doc:

https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/

 

other infor

root@SZV1000240235:/home/kubernetes/cluster/ubuntu/binaries# ./kubectl get nodes

the server doesn't have a resource type "nodes"

root@SZV1000240235:/home/kubernetes/cluster/ubuntu/binaries# ./kubectl get pods

the server doesn't have a resource type "pods"

./kube-apiserver

--service-cluster-ip-range=10.1.0.1/24

--etcd-servers=http://127.0.0.1:4001

--advertise-address=100.109.165.127

--bind-address=100.109.165.127

--insecure-bind-address=100.109.165.127

--v=4

log infor

W0317 15:16:55.425419 130979 storage_extensions.go:137] third party resource sync failed: the server does not allow access to the requested resource (get thirdpartyresources.extensions)

E0317 15:17:00.119963 130979 controller.go:162] unable to sync kubernetes service: the server does not allow access to the requested resource (post services)

W0317 15:17:06.226957 130979 storage_extensions.go:137] third party resource sync failed: the server does not allow access to the requested resource (get thirdpartyresources.extensions)

E0317 15:17:11.745722 130979 controller.go:162] unable to sync kubernetes service: the server does not allow access to the requested resource (post services)

W0317 15:17:17.069298 130979 storage_extensions.go:137] third party resource sync failed: the server does not allow access to the requested resource (get thirdpartyresources.extensions)

E0317 15:17:24.228106 130979 controller.go:162] unable to sync kubernetes service: the server does not allow access to the requested resource (post services)

W0317 15:17:28.683806 130979 storage_extensions.go:137] third party resource sync failed: the server does not allow access to the requested resource (get thirdpartyresources.extensions)

E0317 15:17:36.439742 130979 controller.go:162] unable to sync kubernetes service: the server does not allow access to the requested resource (post services)

 

 

 

 

related issue

https://github.com/kubernetes/kubernetes/issues/43276

What's wrong with my configuration?

thanks a lot

Rodrigo Campos

unread,
Mar 17, 2017, 4:11:47 PM3/17/17
to kubernet...@googlegroups.com
It seems you don't have valid credentials for your kubectl client.

It depends on how is auth configured in your cluster, what you need for auth.

Most tools, though, install credentials for kubectl when you run them.

How did you install the cluster?
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

cao...@gmail.com

unread,
Mar 22, 2017, 10:25:50 PM3/22/17
to Kubernetes user discussion and Q&A
I install the cluster refer the following url:
https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/

在 2017年3月18日星期六 UTC+8上午4:11:47,Rodrigo Campos写道:
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
>
> To post to this group, send email to kubernet...@googlegroups.com.

Rodrigo Campos

unread,
Mar 22, 2017, 11:03:53 PM3/22/17
to kubernet...@googlegroups.com
On Wed, Mar 22, 2017 at 07:25:50PM -0700, cao...@gmail.com wrote:
> I install the cluster refer the following url:
> https://kubernetes.io/docs/getting-started-guides/ubuntu/manual/

It seems that guide if for kubernetes 1.2, but the clone doesn't checkout to
that branch. So that might be an issue.

But if it did, this line should create credentials for kubectl on the machine
you run it:

KUBERNETES_PROVIDER=ubuntu ./kube-up.sh

This kubectl error is in the machine you run it?


I'm not sure that guide is maintained, you may want to check kubeadm for easy
manual installations, too. And newer versions of kubernetes =)

Cao Jack

unread,
Mar 23, 2017, 4:05:27 AM3/23/17
to Kubernetes user discussion and Q&A
kube-apiserver --service-cluster-ip-range=10.1.0.1/24 --insecure-bind-address=0.0.0.0 --etcd-servers=http://127.0.0.1:4001 --secure-port=0 --insecure-port=35001 --allow-privileged=True --advertise-address=100.109.165.127 --bind-address=100.109.165.127 --insecure-bind-address=100.109.165.127 ./kubectl version -s 100.109.165.127:35001 in .profile add all the ip in no_proxy suck as export no_proxy="127.0.0.1,localhost,100.109.196.103,100.109.165.127"
 the issue reolved
thanks a lot
在 2017年3月23日星期四 UTC+8上午11:03:53,Rodrigo Campos写道:
Reply all
Reply to author
Forward
0 new messages