Questions tagged [kubernetes-custom-resources]
123 questions
0
votes
1 answer
Kubernetes Ansible operators: Patch an existing deployment fails
I recently start studying for kubernetes and ansible.
I have the following kubernetes command in order to do rollback
kubectl patch deployment -n my-namespace mydeployment --type='json' -p='[
{"op": "replace", "path":…

getsoubl
- 808
- 10
- 25
0
votes
1 answer
Define Kubernetes Custom Resource requiring one of the following fields or no fields
I try to define a new Custom Resource, requiring it to have one of (1) field A, (2) field B, or (3) empty body.
For example: {A: 1}, {B: 1}, {} are OK, but {A:1, B:2} is not.
Here is the definition of my Custom Resource in form of OpenApi…

Augustin Pan
- 147
- 1
- 9
0
votes
1 answer
Kube API for Listing the CustomResource instances in a namespace (or on a cluster) in Kubernetes
Using command-line utility kubectl we can list a custom resource instances as follows
kubectl get
In a similar fashion, do we have a REST API to achieve the same? i.e. the API takes the Kind of the CustomResource and lists all…

krckumar
- 544
- 4
- 21
0
votes
2 answers
Automatically creating resources/objects with creation of namespace in Kubernetes
I am trying to find a way? If I create a new namespace then I want it to create a RBAC rule for that serviceaccount automatically.
I know one way is to create an operator so, that there is an event that is traced by reconciler / api server and it…

Manmohan Rawat
- 51
- 3
0
votes
1 answer
AWS EKS Service account cluster role bindings not working access Forbidden
I`m facing issues with AWS EKS cluster roles looks like binding to service account it not working correctly.
Service Account
apiVersion: v1
kind: ServiceAccount
metadata:
name: operator
namespace: operator
ClusterRole
apiVersion:…

Philip Petrov
- 95
- 1
- 1
- 11
0
votes
1 answer
Kubernetes 'watch' not receiving events from inside pod
I'm using an EKS cluster. I have a script which calls the 'watch' API on a custom resource. When I run this script using my cluster admin credentials from my laptop, I can see that events arrive as expected. However, whenever I run this script…

James
- 31
- 3
0
votes
1 answer
How does kubectl configure CRDs?
There're already some CRDs defined in my kubernetes cluster.
kubectl can create/update/delete the resources well.
When I tried to do those operations with program, the way I found by searching is to generate code with below…

Wei Huang
- 590
- 1
- 5
- 18
0
votes
1 answer
K8s CRD Error: Unsupported Media type 415
So I was following along this tutorial (https://www.youtube.com/watch?v=KBTXBUVNF2I) and after setting up the reconciler, when I execute "make run", I am getting the following error:
/Users/sourav/go/bin/controller-gen…

DarthSett
- 21
- 1
- 5
0
votes
1 answer
How can i ignore CRD modify event on status update of custom resource objects
After processing of a CRD instance i am trying to patch the status of the CRD via my custom ingress controller in python.
After patch of the status, i am receiving a modify event from kube-api server on the crd instance since resourceversion is…

user12731773
- 9
- 3
0
votes
2 answers
How to remove version from status.storedVersions while Manually upgrading the existing objects to a new stored version in k8s custome resources
How to remove version from 'status.storedVersions' while Manually upgrading the existing objects to a new stored version in kubernetes custom resources
apiVersion for CRD: apiextensions.k8s.io/v1beta1
Using aws EKS
CRD YAML
apiVersion:…

DK_
- 11
- 2
0
votes
1 answer
CustomResource Spec value returning null
Hi I have created following CustomResourceDefinition - crd.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: test.demo.k8s.com
namespace: testns
spec:
group: demo.k8s.com
versions:
- name: v1
…

PREETI BANSAL
- 185
- 2
- 12
0
votes
1 answer
Where is the root list of CRDs that `operator-courier verify` wants me to update?
When running operator-courier verify against my Operator Bundle built using the Operator Framework's operator-sdk, I'm getting the following error.
ERROR: custom resource definition REDACTED referenced in csv not defined in root list of crds.
I…

Josiah
- 2,666
- 5
- 30
- 40
0
votes
2 answers
Kubernetes: using CustomResourceDefinition + operator to create DB access secrets
I am planning to create a special 'deployer' deployment on k8s (one 'deployer' per cluster).
It's role would be to pull specifications from a central place, create k8s manifests and apply them.
The end result should be multiple deployments, each in…

Alechko
- 1,406
- 1
- 13
- 27
0
votes
0 answers
How to use slices and maps with the k8s.io/code-generator
I'm writing a Kubernetes Controller listening on a Environment Custom Resource.
The pkg/apis/environment/v1alpha1/types.go has the following content:
package v1alpha1
import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
//…

Cocotton
- 910
- 2
- 7
- 22
-1
votes
1 answer
Terraform kubectl_manifest error: metadata.annotations: Too long: must have at most 262144 bytes
I'm trying update an existing kubectl_manifest resource in my Terraform code but when I apply the changes, I get the following error:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions",
GroupVersionKind:…

Abdullah Khawer
- 4,461
- 4
- 29
- 66