Skip to main content

All Questions

Tagged with
1 vote
0 answers
28 views

Unable to connect to Postgres StatefulSet in kubernetes cluster from go web server

I have a web server in Golang that connects to Postgres as a StatefulSet. However, I am getting an error with the connection where there is no such host found. The web server was created using ...
helloitsme's user avatar
0 votes
0 answers
25 views

How to debug a testify golang code which is deployed in k8s cluster as job using vscode?

I am trying to debug golang test code which is deployed as job in local k8s cluster. I have installed cloud code extension. In my dockerfile I have installed dlv. dockerfile is as below FROM myorg.com/...
Samselvaprabu's user avatar
0 votes
1 answer
33 views

Golang K8s operator - what is causing a nil pointer Error?

I'm developing a custom k8s operator that utilizes this go-client library: https://github.com/newrelic/newrelic-client-go/tree/main to makes API calls to New Relic (3rd party service). I've created a ...
nobrac's user avatar
  • 417
1 vote
1 answer
63 views

When is the k8s controller-runtime manager client cache updated

I am working on a k8s controller using the k8s controller-runtime's setupWithManager approach. During my reconciliation loop, on mgr.GetClient().Status().Update(...) I sometimes hit Operation cannot ...
festiv's user avatar
  • 399
2 votes
1 answer
74 views

How do I programmatically validate a go structure that has kubebuilder validation markers?

Say I have the following structure with kubebuilder validation markers: type ToySpec struct { // +kubebuilder:validation:MaxLength=15 // +kubebuilder:validation:MinLength=1 Name string `...
Joe's user avatar
  • 304
1 vote
0 answers
23 views

Containerd, extend network interface/access to DIND container to perform docker pull

I have an unusual use case, for a number of reasons my company asked me to rewrite my application and deploy it using containerd on Kubernets.The app does something similar to Github Actions and ...
skj_27's user avatar
  • 11
1 vote
0 answers
20 views

kubernetes: multiple reconcile instances updating the same non-kubernetes object

I have a kubernetes reconciler written in GO. The MaxConcurrentReconciles set to be greater than one. Every time the target kubernetes object gets deleted, I need to update a list(remove the id of the ...
Amol Deodhar's user avatar
2 votes
0 answers
64 views

FATA[0005] failed to create API: unable to run post-scaffold tasks of "base.go.kubebuilder.io/v3": exit status 2

I have tried with go version 1.22.5, 1.20.5,1.17, and sdk version: operator-sdk version operator-sdk version: "v1.20.0", commit: "deb3531ae20a5805b7ee30b71f13792b80bd49b1", ...
Ahtasham Ul Hassan's user avatar
1 vote
0 answers
21 views

Apache Pulsar Go Client created unexpected producer/consumer

I have a Go application which tests sending and receiving messages through Apache Pulsar and deploy them within the same Kubernetes cluster, as follows: package main import ( "context" ...
Frank Wu's user avatar
1 vote
0 answers
52 views

Comunicate to a k3s cluster from other docker container on the same network

I have a golang test that setup multiple stand alone docker containers using dockertest lib, and a k8s cluster that I setup using k3s. As part of the test, I'm creating a docker network with name &...
Avishay28's user avatar
  • 2,416
2 votes
0 answers
95 views

How to create kubernetes client with go sdk for AWS EKS with automatic token refresh

I am using the function newClientset below to create a clientset to send requests to api-server of an AWS EKS cluster. Arguments clusterCAData and clusterEndpoint are retrieved dynamically by the ...
Everton's user avatar
  • 13.6k
1 vote
0 answers
70 views

Issue with Go Application on Kubernetes: Informer Blocked on Semaphore

We are encountering an issue in our Go application running as a Kubernetes pod that uses multiple informers. Analysis of the dump file revealed that a goroutine is primarily blocked on acquiring a ...
Giri's user avatar
  • 13
1 vote
0 answers
275 views

Golang delve in Kubernetes container - "use of closed network connection"

Edit: Before you go through the entire question, note the update at the end (the pod restarts were caused by a liveness probe failing). I am not deleting the question, because: it links to a very ...
Bogd's user avatar
  • 748
5 votes
1 answer
182 views

Field conflict with kubernetes dynamic client and server-side apply

How do I correctly use the kubernetes client-go library with a dynamic client and server-side apply? I am creating and then trying to update a Kubernetes resource using the dynamic client, with ...
kai's user avatar
  • 2,130
1 vote
0 answers
48 views

Golang - K8S DeepCopyInto function failing because Secret type undefined

I have the following function, with which I'm trying to copy a secret into another namespace. My GO code fails saying that the Secret type is undefined, but it should be inherited from the core/v1 ...
Razvan's user avatar
  • 31

15 30 50 per page
1
2 3 4 5
65