Reputation: 503
One of my project which is using kubernetes to manage the containers has something called test. Where developer has defined connectivity.
I tried to search it over the internet but found nothing which can clear this.
Can somebody help me to understand this kind and connectivity in test.yml?
kind: test
spec:
connectivity:
to:
from
Upvotes: 0
Views: 89
Reputation: 4274
kind: Test
is a CustomResource (CR).
CRs can be used in a cluster after applying a CustomResourceDefinition (CRD) that describes all the fields.
By doing so you extend Kubernetes with new objects that can be used. This is useful if you want to write your own operator or controller. Without an operator/controller the CR is not doing anything. It will just hold some information that you can lookup (similar to a ConfigMap) but it will not do anything.
Here is an explanation on how Kubernetes works for in-built objects such as a Deployment:
kubectl apply -f some-deployment.yaml
name
of the Deployment, replicas
, image
to use, ...) in etcdAs you can see the one that actually creates the Pods is the kube-controller-manager.
In case the kube-controller-manager does not support all the features you expect from Kubernetes, you are able to create your own controller which is called an operator by using the operator SDK. Your operator can then watch all objects that you will create as a CustomResource (such as Test
).
To check all the CRDs you applied on your cluster execute:
$ kubectl get crd
To get a list of all objects that you can apply to Kubernetes execute the following:
$ kubectl api-resources
Upvotes: 1
Reputation: 2714
It's what we call creating CustomResourceDefinition
(CRD) in kubernetes world.
Read the docs : Using Custom Resources for clarity.
Upvotes: 0