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

The error is related to the certificate used for debugging the webhook locally. #497

Closed
googs1025 opened this issue Apr 5, 2024 · 5 comments

Comments

@googs1025
Copy link
Member

sor, I have a beginner's question.
I'm trying to debug a program in GoLand IDE locally, but when I modify the configuration file, I encounter some certificate authentication errors. I would like to ask how you configure it when developing locally.
How to configure a certificate.

➜  jobset git:(add_pod_controller_unit_test) ✗ kubectl get pods -A                               
NAMESPACE       NAME                                        READY   STATUS    RESTARTS   AGE
jobset-system   jobset-controller-manager-787489c96-s97l6   2/2     Running   0          2m4s
kube-system     coredns-5dd5756b68-7msgg                    1/1     Running   0          6h9m
kube-system     etcd-minikube                               1/1     Running   0          6h9m
kube-system     kube-apiserver-minikube                     1/1     Running   0          6h9m
kube-system     kube-controller-manager-minikube            1/1     Running   0          6h9m
kube-system     kube-proxy-mrpk5                            1/1     Running   0          6h9m
kube-system     kube-scheduler-minikube                     1/1     Running   0          6h9m
kube-system     storage-provisioner                         1/1     Running   0          6h9m
➜  jobset git:(add_pod_controller_unit_test) ✗ kubectl apply -f examples/simple/paralleljobs.yaml
Error from server (InternalError): error when creating "examples/simple/paralleljobs.yaml": Internal error occurred: failed calling webhook "mjobset.kb.io": failed to call webhook: Post "https://host.docker.internal:9443/mutate-jobset-x-k8s-io-v1alpha2-jobset?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "jobset-ca")
➜  jobset git:(add_pod_controller_unit_test) ✗ 

apiVersion: v1
items:
- apiVersion: v1
  data:
    ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURIVENDQWdXZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFsTVE4d0RRWURWUVFLRXdacWIySnoKWlhRe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TEpKam42N0x3bUpBR2YrCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
  kind: Secret
  metadata:
    creationTimestamp: "2024-04-05T06:14:14Z"
    name: jobset-webhook-server-cert
    namespace: jobset-system
    resourceVersion: "14230"
    uid: eccdc6cd-0268-42cb-89b9-6871fb9faf4e
  type: Opaque
kind: List
metadata:
  resourceVersion: ""
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  annotations:
    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
  creationTimestamp: "2024-04-05T06:14:14Z"
  generation: 2
  labels:
    app.kubernetes.io/component: webhook
    app.kubernetes.io/created-by: jobset
    app.kubernetes.io/instance: mutating-webhook-configuration
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/name: mutatingwebhookconfiguration
    app.kubernetes.io/part-of: jobset
  name: jobset-mutating-webhook-configuration
  resourceVersion: "14232"
  uid: a2808207-5cb7-4cd7-bb31-3d1df3f8ba3d
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURIVENDQWdXZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFsTVE4d0RRWURWUVFLRXdacWIySnoKWlhReEVqQVFCZ05WQkFNVENXcHZZbk5sZEMxallUQWVGdzB5TkRBME1EVXdOVEUyTURCYUZ3MHpOREEwTURNdwpOakUyTURCYU1DVXhEekFOQmdOVkJBb1RCbXB2WW5ObGRERVNNQkFHQTFVRUF4TUphbTlpYzJWMExXTmhNSUlCCklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF6ZlVxV3FxSVEveUhJNnhEMHc3Z0MzQ3YKZ0lpTVRMb1ZZUkNYRmNoZWNtT29lR1BmVXhSd1cybjRrcVpxZ0lPdm44bi82QjlHR1E0SFlmdktSWVdR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.docker.internal:9443/mutate-jobset-x-k8s-io-v1alpha2-jobset
  failurePolicy: Fail
  matchPolicy: Equivalent
  name: mjobset.kb.io
  namespaceSelector: {}
  objectSelector: {}
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - jobset.x-k8s.io
    apiVersions:
    - v1alpha2
    operations:
    - CREATE
    - UPDATE
    resources:
    - jobsets
    scope: '*'
  sideEffects: None
  timeoutSeconds: 10
- admissionReviewVersions:
  - v1
  clientConfig:
    caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURIVENDQWdXZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFsTVE4d0RRWURWUVFLRXdacWIySnoKWlhReEVqQVFCZ05WQkFNVENXcHZZbk5sZEMxallUQWVGdzB5TkRBME1EVXdOVEUyTURCYUZ3MHpOREEwTURNdwpOakUyTURCYU1DVXhEekFOQmdOVkJBb1RCbXB2WW5ObGRERVNNQkFHQTFVRUF4TUphbTlpYzJWMExXTmhNSUlCCklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF6ZlVxV3FxSVEveUhJNnhEMHc3Z0MzQ3YKZ0lpTVRMb1ZZUkNYRmNoZWNtT29lR1BmVXhSd1cybjRrcVpxZ0lPdm44bi82QjlHR1E0SFlmdktSWVdRMkkvegp1TzVkb3ljMWV2VTgzdlZLbkxoQlZMeGNrcXk4UzJDQ0JqUytIREJvSFFIZ1RqK3A1amhGcHBUbjdnZ21iQzRPCk81RjMyQU9WZDZJYTU1c1JDN25PWEo0djRBeEFsRkhDLy9PL2ZzRUU3c1lKUXZ3WUd4dTg5RnJRWTlXN1Y0VG4KaFVQZkk3VitJRGtaMGdVNjdFK09QWWgvc1czRVVzWXpsTWQxclh6MWdNTmNsc0JPUmppblMxMmM2eDQwZ2UrQQpSVzI3bkJ2Y1Vtb2lpT1M1M2FJblBRbm9GZnlMS3pMWERvKzJNbFdLandFUGVQazdGQUJmUldwb0hiYlJMd0lECkFRQUJvMWd3VmpBT0JnTlZIUThCQWY4RUJBTUNBcVF3RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFkQmdOVkhRNEUKRmdRVVNWcERSaURaaC9wZkE2RnFrVDZmdHpYZUxvY3dGQVlEVlIwUkJBMHdDNElKYW05aWMyVjBMV05oTUEwRwpDU3FHU0liM0RRRUJDd1VBQTRJQkFRQmx5VVY5REV3QU5NcytyakFlVkhQOEdWempJbHNkNUVXYUZFYlNTMHVSCk8zQ1FUTXRvK2VKTVo4RzNucld6T3h0elJuWkw0dzlCWDYrbzRQQ1dML3g3UExEbFZ0NDc3c3p3ZXE4SGU3R24KeFRRckNKbU8yWmlLdUtPaHM1UUpHNlAyQ0t4ZTNVY3RqODk5YW8wNlZGNVBYUkRCMVRUQU92NFFFNXFJU1RrZgpvV3JkaU5ZT1F3emJyKzdhdjdZSHVGUTlPbWp6R09yYzY4L2dVSFFKaGtta0laaW9yVCt0Vkg4My9hNW5LT1dxCkdSQmVQc29odTVROHlQemZEWlVVUEJUZ2hBS0U5TWdFOUlXQTJKR2VuTldxczF6aGV3M0JUQzNlWGV2SW1JbW8KUFVmTG53V21jRE9XWWNqR0dKSUIzVjFhcTQva25pOC9rb1pqM1lWMHZOdDMKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    url: https://host.docker.internal:9443/mutate--v1-pod
  failurePolicy: Fail
  matchPolicy: Equivalent
  name: mpod.kb.io
  namespaceSelector: {}
  objectSelector:
    matchExpressions:
    - key: jobset.sigs.k8s.io/jobset-name
      operator: Exists
  reinvocationPolicy: Never
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    resources:
    - pods
    scope: '*'
  sideEffects: None
  timeoutSeconds: 10
@googs1025
Copy link
Member Author

I have solved it

@kannon92
Copy link
Contributor

kannon92 commented Apr 5, 2024

Could you explain?

@googs1025
Copy link
Member Author

@kannon92 hi, thank you for ans. Do you mean to explain how I solved the problem? or what's the problem I'm having?

@kannon92
Copy link
Contributor

kannon92 commented Apr 5, 2024

Yes, please explain in case someone stumbles upon the closed issue.

@googs1025
Copy link
Member Author

googs1025 commented Apr 5, 2024

➜  ~ kubectl get secret -njobset-system -oyaml
apiVersion: v1
items:
- apiVersion: v1
  data:
    ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURIVENDQWdXZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFsTVE4d0RRWURWUVFLRXdacWIySnoKWlhReEVqQVFCZ05WQkFNVENXcHZZbk5sZEMxallUQWVGdzB5TkRBME1EVXhNREUyTURkYUZ3MHpOREEwTURNeApNVEUyTURkYU1DVXhEekFOQmdOVkJBb1RCbXB2WW5ObGRERVNNQkFHQTFVRUF4TUphbTlpYzJWMExXTmhNSUlCCklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFzWC9RMndoR3hmd0o4eVJhc2dHZmswZTYKSm9QcTFubzNiSlpjcFRDNUI1OXhsSnZZNEwvcEN0aDhKYnQya2tHR0dLM21LaUpwbUZXV1BoM0FJWXA5ZVRzdQpUN0lEVGNUa0ZNbVJ5UXZpamc0UGg3R2EvdnNPTjZiWERnWThDOVBuRStEa25rcnNrVlFjclg3RUw0VXNkREQvCk5vcTNNVnk5RStZTkFNcnpFa05OYmZZVENJdjJxR25HYjYxbkVKK0x1VTY4ajBscWJFWjVxRUJOdUR6UzhnbWgKR1Y4Sm5kVDVJa2N3eXc4Z1FqcDgyQ29EbVo1YWVCNnN5QmpQT0VqMm9TUmF1aUhLalFzRDVSYkl0OGwwRjFaOAp5L1ZoWGZkK0xuTGNhYmVCVHBod1hSMDA1TTByWXF1ckRmRDdFMS9xN2JnZDI1VkF3MnZZbnhjTGp6bXUxUUlECkFRQUJvMWd3VmpBT0JnTlZIUThCQWY4RUJBTUNBcVF3RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFkQmdOVk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QejlwM0NrV1dEZnk4ZWxvSURQc3gwSXdPcHZPQ3U2OE9aM2FDdWpyejViRVR0LzRaCnBkQlZ2UkdKQW9HQkFLNUQrem9lN0NHT3E3ZVZGSENLMVhGcGlQMlo3STF1MTdFcTBGUmMvNGphNUk0WXZ6YnMKVEc4eEtjTTZLZ1BtSmRLRkcwSHYzcDdtM2lxOU5JZlJGZ3orUVZPSjV5SFE5YXJBVnFUOVZsWFZBL2FTNjMyMAp6UjRlOU1iSFFtQVpOQUEzZkpUZ283VXJYNncxdk5yOTBrREpVK2RRenZZRWFGK2ViRWYzWkc3MgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
  kind: Secret
  metadata:
    creationTimestamp: "2024-04-05T11:15:53Z"
    name: jobset-webhook-server-cert
    namespace: jobset-system
    resourceVersion: "15807"
    uid: 383be8f5-8423-4705-ad32-52c39de2ad83
  type: Opaque
kind: List
metadata:
  resourceVersion: ""

Set the dns variable to "host.docker.internal"

// pkg/util/cert/cert.go
const (
	serviceName             = "jobset-webhook-service"
	secretName              = "jobset-webhook-server-cert"
	secretNamespace         = "jobset-system"
	certDir                 = "/tmp/k8s-webhook-server/serving-certs"
	validateWebhookConfName = "jobset-validating-webhook-configuration"
	mutatingWebhookConfName = "jobset-mutating-webhook-configuration"
	caName                  = "jobset-ca"
	caOrg                   = "jobset"
)

// dnsName is the format of <service name>.<namespace>.svc
// var dnsName = fmt.Sprintf("%s.%s.svc", serviceName, secretNamespace)
var dnsName = "host.docker.internal"

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