Archive for September, 2021

How to view Kubernetes resources of a specific API version

Posted on: September 20th, 2021 by Olu No Comments

Hi folks,

Here’s a quick tip on how to view Kubernetes resource of a specific API version. For example, there are different types of Network Policy resources that Kubernetes supports.

There’s the default network policy which has kind NetworkPolicy under apiVersion networking.k8s.io/v1.
Then let’s say there’s another resource of kind NetworkPolicy under apiVersion projectcalico.org/v3.

How do you view all network resources under apiVersion projectcalico.org/v3?

Here’s the command for it:

kubectl get networkpolicy.v3.projectcalico.org

That’s all for now. Happy Software Development.

How to run a one-off job from a Kubernetes Cronjob

Posted on: September 7th, 2021 by Olu No Comments

Hi folks,

In this post I talk about how to manually run a job from a Kubernetes cronjob.

Assume the cronjob is called mycronjob, you can use the following command:


kubectl create job --from=crojob/mycronjob name-of-job

That’s all for now. Happy software development.