bank-vaults: failed calling admission webhook

Describe the bug

kube-apiserver logging error output: 
"k8s\x00\n\f\n\x02v1\x12\x06Status\x12\xe8\x02\n\x06\n\x00\x12\x00\x1a\x00\x12\aFailure\x1a\xa2\x01
Internal error occurred: failed calling admission webhook
 \"pods.vault-secrets-webhook.admission.banzaicloud.com\": 
the server could not find the requested resource\"\rInternalError*\x9d\x01\n\x00\x12\x00\x1a\x00\"\x90\x01\n\x00\x12\x89\x01
failed calling admission webhook \"pods.vault-secrets-webhook.admission.banzaicloud.com\": 
the server could not find the requested resource\x1a\x00(\x002\x000\xf4\x03\x1a\x00\"\x00"

Api-server error after applying manifest. Deployment appears, but pods are not created. After removing the chart, everything works fine

Chart:

apiVersion: v1
appVersion: 0.3.27
description: A Helm chart that deploys a mutating admission webhook that configures
  applications to request env vars from Vault Secrets
maintainers:
- email: info@banzaicloud.com
  name: Banzai Cloud
name: vault-secrets-webhook
version: 0.2.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I found it!

$ kubectl get ns secrets -o yaml
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{},"labels":{"acronym":"secrets","certmanager.k8s.io/disable-validation":"true","name":"Secrets"},"name":"secrets"}}
  creationTimestamp: "2019-03-07T00:23:44Z"
  labels:
    acronym: secrets
    certmanager.k8s.io/disable-validation: "true"
    name: Secrets
  name: secrets
  resourceVersion: "433222893"
  selfLink: /api/v1/namespaces/secrets
  uid: 44903251-406f-11e9-b226-0a345d48b080
spec:
  finalizers:
  - kubernetes
status:
  phase: Active

notice the ‘label’ of name = Secrets… I renamed this to ‘secrets’ and it worked. That is, the webhook deployed and the pods in the deployment came up, etc.