Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I do not see custom-metrics-apiserver pod #38

Open
sdhanraj opened this issue Feb 21, 2018 · 3 comments
Open

I do not see custom-metrics-apiserver pod #38

sdhanraj opened this issue Feb 21, 2018 · 3 comments

Comments

@sdhanraj
Copy link

sdhanraj commented Feb 21, 2018

Hi @luxas,
I am following the sample provided @ https://docs.bitnami.com/kubernetes/how-to/configure-autoscaling-custom-metrics/ to try horizontal scaling of pods. During the creation of custom API server when I do "kubectl create -f custom-metrics.yaml", I see that the custom service is deployed. But I do not see the pod corresponding to it. Is there a step I am missing?

kubectl create -f custom-metrics.yaml --show-all=true
namespace "custom-metrics" created
serviceaccount "custom-metrics-apiserver" created
clusterrolebinding "custom-metrics:system:auth-delegator" created
rolebinding "custom-metrics-auth-reader" created
clusterrole "custom-metrics-read" created
clusterrolebinding "custom-metrics-read" created
deployment "custom-metrics-apiserver" created
service "api" created
apiservice "v1alpha1.custom-metrics.metrics.k8s.io" created
clusterrole "custom-metrics-server-resources" created
clusterrolebinding "hpa-controller-custom-metrics" created

kubectl get pods -n custom-metrics
No resources found.

Location of custom metrics yaml https://github.com/kubeless/kubeless/blob/master/manifests/autoscaling/custom-metrics.yaml

@sdhanraj
Copy link
Author

I did a browse on cluster and in the namespace corresponding to custom metrics server I see the following error.

Error creating: pods "" is forbidden: SecurityContext.RunAsUser is forbidden

@sdhanraj
Copy link
Author

I see the same issue when I follow the instructions @ https://github.com/luxas/kubeadm-workshop#deploying-the-prometheus-operator-for-monitoring-services-in-the-cluster. I am creating a ACS cluster on Azure and version of Kubernetes is 1.7.9.

@StevieBowman
Copy link

@sdhanraj Had the same error message on ACS (1.9.2). You need to edit the kube-apiserver.yaml (sudo vi kube-apiserver.yaml) on the Master Server (found in /etc/kubernetes/manifests). Remove the SecurityContextDeny from the --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota,DenyEscalatingExec,AlwaysPullImages,SecurityContextDeny argument in the file. Save the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants