<p>I am pretty new in the kubernetes field, and have specific interest in kubernetes eventing.   What I did was creating a K8 cluster, assign PODs to that cluster, and type <strong>kubectl get events</strong> command to see the corresponding events. Now for my work, I need to explore how can I create an K8 event resource using the eveting API provided <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#-strong-write-operations-event-v1-core-strong-" rel="nofollow noreferrer">here</a>, so that using the <strong>kubectl get events</strong> command I can see the event stored in etcd. But as I mentioned I don't know K8 that deep, I'm struggling to make this api work.</p>
<p>N.B. I had a look into knative eventing, but seems to be the eventing feature Knative provides, is different than the K8 eveting, as I can't see the Knative events in the <strong>kubectl get events</strong> command. (please correct me if I am wrong).</p>
<p>Thanks in advance.</p>

Joyanta Biswas Mishu
<p>Usually events are created in Kubernetes as a way of informing of relevant status changes of an object.</p>
<p>Creating an event is as simple as:</p>
<pre><code>kubectl apply -f - &lt;&lt;EOF
apiVersion: v1
kind: Event
metadata:
  name: myevent
  namespace: default
type: Warning
message: 'not sure if this what you want to do'
involvedObject:
  kind: someObject
EOF
</code></pre>
<p>But usually this is done programmatically, using the Kubernetes client library of your choice and the core (v1) API group.</p>
<p>Knative Eventing is platform that enables Event Driven architectures, which does not seems related to your question, but if it were, you can find all getting started docs here:</p>
<ul>
<li>Installation: <a href="https://knative.dev/docs/install/yaml-install/eventing/install-eventing-with-yaml/" rel="nofollow noreferrer">https://knative.dev/docs/install/yaml-install/eventing/install-eventing-with-yaml/</a></li>
<li>Getting started: <a href="https://knative.dev/docs/eventing/getting-started/" rel="nofollow noreferrer">https://knative.dev/docs/eventing/getting-started/</a></li>
</ul>
