Questions tagged [kubernetes-custom-resources]
123 questions
1
vote
1 answer
Is it mandatory to upgrade CRDs deprecated apiVersions?
I have a few external CRDs with old apiVersion applied in the cluster, and operators based on those CRDs deployed.
As said in official docs about Kubernetes API and Feature Removals in 1.22.
You can use the v1 API to retrieve or update existing…

Ivan Aracki
- 4,861
- 11
- 59
- 73
1
vote
1 answer
Missing default value in nested field of kubernetes custom resource
I have a Custom Resource Definition which has nested fields with default values (some boilerplate omitted for brevity):
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
spec:
scope: Namespaced
group: thismatters.stackoverflow
…

Thismatters
- 507
- 4
- 14
1
vote
1 answer
How to print Status fields defined in Kubebuilder to show up when using Kubectl
How do I have to specify the comments like +kubebuilder:printcolumn to add columns to the output of the command kubectl get my-crd.my-group.my-domain.com?
I've a CRD (Custom Resource Definition) with the usual structs for the specs and the status…

TPPZ
- 4,447
- 10
- 61
- 106
1
vote
0 answers
k8s - multiple ownerrefs in CRDs
Say I have the following CRD:
...
kind: SomeCRD
metadata:
ownerReferences:
- uid: aaa
name: name-a
...
When I run kubectl apply -f some.yaml where some.yaml is the following
...
kind: SomeCRD
metadata:
ownerReferences:
- uid: bbb
…

Nancy Hsu
- 11
- 1
1
vote
0 answers
Kubernetes Custom Resource Status with helm-based operator using operator-sdk
I have created a Helm Based Operator Of Freeradius Server.
I would like for each Free Radius Instance to include at the Custom Resource Status the Nodeport Service Resource IP and Port number.
Is there any way to do it by only using Helm-Based…

Kostas Tsakos
- 169
- 10
1
vote
0 answers
Must CRD version migration work both ways?
I develop a component that utilises CRDs and is available in two versions - v1 and v2. It is possible to create a v2 resource based on v1 definition but it cannot be done the opposite way. V2 just drops some fields since they are not required…

Mateusz Stompór
- 461
- 6
- 15
1
vote
0 answers
Using Kubernetes and CRDs as a database and then searching
My background is from a more traditional LAMP stack but with a strong RDBMS orientation, so to me everything in life (including grocery list) is a potential relational database.
My company is now fully committed to using golang and kubernetes CRDs…

Oliver Williams
- 5,966
- 7
- 36
- 78
1
vote
2 answers
Debugging why Reconcile triggers on Kubernetes Custom Operator
I've a custom operator that listens to changes in a CRD I've defined in a Kubernetes cluster.
Whenever something changed in the defined custom resource, the custom operator would reconcile and idempotently create a secret (that would be owned by the…

Alechko
- 1,406
- 1
- 13
- 27
1
vote
3 answers
Kubernetes python API get instances of CRD
I'm currently using the Python APIs for Kubernetes and I have to:
Retrieve the instance of a custom resource name FADepl.
Edit the value of that instance.
In the terminal, I would simply list all FADepls with kubectl get fadepl and then edit the…

texdade
- 72
- 10
1
vote
2 answers
How do I create a Kubernetes Custom Resource using javascript client
My custom definition
apiVersion: something.com/v1alpha1
kind: MyKind
metadata:
name: test
spec:
size: 1
image: myimage
Here is an answer that shows how to create a deployment using a javascript client. However, I need to create a…

Atul
- 598
- 5
- 12
1
vote
2 answers
How to write kubernetes custom controller to operate VM resource in cloud?
I am new to the writing a custom controllers for the kubernetes and trying to understand this. I have started referring the sample-controller https://github.com/kubernetes/sample-controller.
I want to extend the sample-controller to operate VM…

john snowker
- 11
- 1
1
vote
1 answer
Extending kubernetes client-go
I'm writing a controller that watches kubernetes service objects, and creates trafficsplits if they contain a certain label.
Since the native kubernetes go client does not support the trafficsplit object, I had to find a way and extend the client so…

Yaron Idan
- 6,207
- 5
- 44
- 66
1
vote
1 answer
Is it possible to extend a Kubernetes CRD with a "sub-class" CRD?
As an example, if I define a CRD of kind: Animal, can I define a CRD, Dog, as a specific type of Animal? The Dog CRD would have a different/extended schema requirement than the base Animal CRD.
My goal here is to be able to do a kubectl get animals…

ivandov
- 619
- 8
- 14
1
vote
1 answer
Updating Metadata Annotations
I am using kubebuilder to create a Kubernetes operator. When an object of my kind is initiated I have to parse the spec and update the objects based on a few calculations.
From what I can tell I can either update the status of the object, the…

BBS
- 1,351
- 2
- 12
- 27
1
vote
1 answer
What is my Custom Resource Definition URL in Kubernetes
I am trying to hit my custom resource definition endpoint in Kubernetes but cannot find an exact example for how Kubernetes exposes my custom resource definition in the Kubernetes API. If I hit the custom services API with…

musterjunk
- 341
- 3
- 15