Questions tagged [kubernetes-custom-resources]

123 questions
2
votes
1 answer

Detect Spec update in the reconcile function

I am starting now with Kubernetes and the Operator SDK and I am trying to build my first operator and I have probably a simple question. Question How to detect a configuration change in the custom resource yaml in the reconcile loop and take an…
2
votes
0 answers

Adding containers in Custom Resource Definition for deployment Pod

I have a sample Deployment.yaml which has containers in it kind: Pod metadata: generateName: test-pod- spec: containers: - name: test-pod image: test/mypod:v5.16 env: - name: testenv valueFrom: configMapKeyRef: …
PREETI BANSAL
  • 185
  • 2
  • 12
2
votes
1 answer

create a custom resource in kubernetes using generateName field

I have a sample crd defined as crd.yaml kind: CustomResourceDefinition metadata: name: testconfig.demo.k8s.com namespace: testns spec: group: demo.k8s.com versions: - name: v1 served: true storage: true scope: Namespaced …
PREETI BANSAL
  • 185
  • 2
  • 12
2
votes
1 answer

Kubernetes Custom Resource Definition use cases

I got a fair bit of CRD understanding by reading hello world type examples. I don't see a need for CRDs for my use cases. Could you list the business use cases solved by CRDs? Update: by business use cases I meant requirements in an organization…
dsatish
  • 1,041
  • 15
  • 27
2
votes
2 answers

Large payload for Custom Objects

While I can create custom objects just fine, I am wondering how one is supposed to handle large payloads (Gigabytes) for an object. CRs are mostly used in order to interface with garbage collection/reference counting in Kubernetes. Adding the…
abergmeier
  • 13,224
  • 13
  • 64
  • 120
2
votes
1 answer

How to avoid missing historic delete events with the watch api

I'm implementing a custom resource controller using the watch API. It needs to create/delete objects in aws when objects are created/deleted in kubernetes. When it starts up the watch, it receives a list of historic events. However, I noticed that…
rcorre
  • 6,477
  • 3
  • 28
  • 33
2
votes
0 answers

kubernetes custom resource definition to keep track of the number of services/namespaces

I am trying to create a custom kubernetes controller which keeps the track of the number kubernetes resources, for example count the number services created in a cluster. there are 2 parts to the above question: 1st I need to create a controller…
Invictus
  • 2,653
  • 8
  • 31
  • 50
1
vote
0 answers

Kubernetes RBAC rule to limit listing to certain CustomResourceDefinitions

I have a lot of CRDs on my kubernetes cluster and I want to assign a role to developers so they can see only certain CRDs. However I couldn't find a way to limit it, I can only give access to all crd resources as follows: - apiGroups:…
1
vote
1 answer

Should I create a new version when I trying to add a field in CRD?

If I want to add a field in a CRD(without change any exist field), Should I do it by create a new version? If I should create a new version, then what's the disadvantages of directly modifying the original version?
1
vote
2 answers

How to return a custom user friendly error message in Kubernetes?

I have a backend with golang that talks to k8s. I want to reformulate the error response that i get from k8s and send it to the frontend. I want to return a meaningful validation error messages for the user, when he add a non valid name, something…
dom1
  • 425
  • 1
  • 2
  • 19
1
vote
1 answer

JSON path semantics different in kubectl and additional printer columns in custom resource definition

I use kubectl to list Kubernetes custom resources of a kind mykind with an additional table column LABEL that contains the value of a label a.b.c.com/key if present: kubectl get mykind…
1
vote
1 answer

Is there a way to get a kubernetes CRD schema with a kubectl command?

A way to get the schema using as an example secretproviderclasses.secrets-store.csi.x-k8s.io i would use the command kubectl describe crd secretproviderclasses.secrets-store.csi.x-k8s.io and get as a result: Name: …
paltaa
  • 2,985
  • 13
  • 28
1
vote
1 answer

can configurable declarative Horizontal Pod AutoScaler (HPA) in seldon deployment (CRD) for multiple deployment environment is possible?

Using CRD of SeldonDeployment I want to configure HPA following this example . The seldon deployment config is - apiVersion: machinelearning.seldon.io/v1 kind: SeldonDeployment metadata: name: seldon-model spec: name: test-deployment …
1
vote
0 answers

How to initialize the status of a CRD in Kubernetes?

I have created a CRD in my Kubernetes environment. The CRD has a corresponding operator. The operator will update the CRD's field .status.serviceState for the users to know the current state of the underlying service. The value of the field…
johnlinp
  • 853
  • 6
  • 22
1
vote
1 answer

Any way to import Kubernetes Object Schemas into CRD Schemas?

I am looking to create a CRD, which has some of the Specs of an existing k8s object. Is there a way of importing the schema and validation checks of the existing spec instead of manually repeating it again? For reference, I am registering the CRD…
1 2 3
8 9