By using kubectl, we can perform operations against all the different elements. We've already had a sneak peek at get to get an idea of what elements are available.
For more information and a quick overview of the most common operations that are available within kubectl, check out the kubectl cheat sheet at https://kubernetes.io/docs/reference/kubectl/cheatsheet/.
We can use kubectl to create a new element. For example, to create and list namespaces, we can use the following code:
$ kubectl create namespace example
namespace/example created
$ kubectl get namespaces
NAME STATUS AGE
default Active 260d
docker Active 260d
example Active 9s
kube-public Active 260d
kube-system Active 260d
We can create various elements, some of which we'll look at throughout this book.