kubernetes-custom-resources

404 when trying to get CRD using python client

只谈情不闲聊 提交于 2021-02-11 12:53:48
问题 What happened I am trying to create custom object in kubernetes using kubernetes python client, but i am unable to do so, it would be helpful if someone can explain what i am doing wrong here Traceback (most recent call last): File "/home/talha/PycharmProjects/doosra/tasks/cluster_tasks.py", line 585, in <module> main() File "/home/talha/PycharmProjects/doosra/tasks/cluster_tasks.py", line 574, in main resource = api.get_namespaced_custom_object( File "/home/talha/PycharmProjects/venv/lib

create a custom resource in kubernetes using generateName field

有些话、适合烂在心里 提交于 2021-02-08 07:21:24
问题 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 names: plural: testconfigs singular: testconfig kind: TestConfig I want to create a custom resource based on above crd but i dont want to assign a fixed name to the resource rather use the generateName field. So i generated the below cr.yaml. But when i apply it gives error

create a custom resource in kubernetes using generateName field

安稳与你 提交于 2021-02-08 07:20:56
问题 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 names: plural: testconfigs singular: testconfig kind: TestConfig I want to create a custom resource based on above crd but i dont want to assign a fixed name to the resource rather use the generateName field. So i generated the below cr.yaml. But when i apply it gives error

K8s CRD Error: Unsupported Media type 415

爱⌒轻易说出口 提交于 2020-04-18 12:35:42
问题 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 object:headerFile=./hack/boilerplate.go.txt paths="./..." go fmt ./... go vet ./... /Users/sourav/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases go run ./main.go 2020-03-15T22:13:29

Kubernetes Custom CRD: “Failed to list …: the server could not find the requested resource”

不问归期 提交于 2019-12-13 15:25:59
问题 I am trying to create a kubernetes Custom Resource Definition (named Block ) but keep hitting the following error: Failed to list *v1alpha1.Block: the server could not find the requested resource (get blocks.kubechain.com). This issue is raised from a call to List on a Controller for this CRD: indexer, controller := cache.NewIndexerInformer( &cache.ListWatch{ ListFunc: func(lo metav1.ListOptions) (result k8sruntime.Object, err error) { return clientSet.Block(ns).List(lo) }, WatchFunc: func(lo