question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reflector return `invalid status code 'Forbidden'`

See original GitHub issue

I find secret can not be copied into the new namespace sometimes. But I don‘t know what happened at all.

Does the reflector provide some information to help find the reason? for example, logs?

By the way, the following is the error log I find in reflector pod.

[ERR] (ES.Kubernetes.Reflector.Core.SecretMirror) Could not reflect tidb-admin/gateway-letsencrypt-secret to e2etesting-system-test-926-pool/gateway-letsencrypt-secret due to exception.
Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'Forbidden'
   at k8s.Kubernetes.SendRequestRaw(String requestContent, HttpRequestMessage httpRequest, CancellationToken cancellationToken)
   at k8s.Kubernetes.CreateNamespacedSecretWithHttpMessagesAsync(V1Secret body, String namespaceParameter, String dryRun, String fieldManager, String fieldValidation, Nullable`1 pretty, IDictionary`2 customHeaders, CancellationToken cancellationToken)
   at k8s.KubernetesExtensions.CreateNamespacedSecretAsync(IKubernetes operations, V1Secret body, String namespaceParameter, String dryRun, String fieldManager, String fieldValidation, Nullable`1 pretty, CancellationToken cancellationToken)
   at ES.Kubernetes.Reflector.Core.Mirroring.ResourceMirror`1.ResourceReflect(KubeRef sourceId, KubeRef targetId, TResource sourceResource, TResource targetResource, Boolean autoReflection) in /src/ES.Kubernetes.Reflector/Core/Mirroring/ResourceMirror.cs:line 432

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
winromuluscommented, Mar 5, 2023

Please try the new version. This issue should be fixed. Please reopen if this is still a problem (some scenarios are extremely hard to reproduce and help is required to validate the fix).

0reactions
Roming22commented, Jan 27, 2023

I’ve also run into the issue. In my case, because I’m deploying the reflector using openshift-gitops, I needed to use kustomize to patch the subjects[0].namespace in the reflector ClusterRoleBinding to the namespace in which the reflector user was created.

Read more comments on GitHub >

github_iconTop Results From Across the Web

V1Secret watcher Faulted · Issue #57 · emberstack ...
Reflector stopped working recently and not sure why. ... Operation returned an invalid status code 'Forbidden' │ │ at k8s.Kubernetes.
Read more >
Operation returned an invalid status code 'Forbidden' in ...
It seems like you are facing an issue with Azure Media Services SDK. The error message "Operation returned an invalid status code 'Forbidden'" ......
Read more >
Operation returned an invalid status code 'Forbidden' - ...
KeyVaultErrorException : Operation returned an invalid status code 'Forbidden' I'm trying to set up my web app, hosted in Azure to read settings ......
Read more >
Operation returned an invalid status code 'Forbidden' Error
I've come across another error message in my seemingly never-ending battle with Azure Key Vault. A while back I couldn't delete a resource ......
Read more >
Troubleshooting Problems with ACME / Let's Encrypt ...
This may be because the domain validation has already failed and the authorization has been marked as 'invalid'. Check the authorization URL on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found