For simulated Practice problems visit KillerCoda.
-
Solution
apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: bustickets.ticket.com spec: group: ticket.com versions: - name: v1 served: true storage: true schema: openAPIV3Schema: type: object properties: spec: type: object properties: from: type: string to: type: string seats: type: integer scope: Namespaced names: plural: bustickets singular: busticket kind: BusTicket shortNames: - bt
-
Solution
kubectl apply -f - <<EOF apiVersion: ticket.com/v1 kind: BusTicket metadata: name: my-ticket spec: from: "New Delhi" to: "Mumbai" seats: 5 EOF
-
Solution
```bash kubectl patch busticket my-ticket --type='json' -p='[{"op": "replace", "path": "/spec/from", "value": "Bangalore"}]' ``` </p>