kubectl config use-context cluster1-admin@cluster1
#vim 16.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: operators.stable.example.com
spec:
group: stable.example.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
name:
type: string
email:
type: string
age:
type: integer
scope: Namespaced
names:
plural: operators
singular: operator
kind: Operator
shortNames:
- op
k apply -f 16.yaml