Creating Resources

Motivation

Create Resources directly from the command line for the purposes of development or debugging.
Not for production Application Management.

Deployment

A Deployment can be created with the create deployment command.

kubectl create deployment my-dep --image=busybox

Running and Attaching

It is possible to run a container and immediately attach to it using the -i -t flags. e.g.
kubectl run -t -i my-dep --image ubuntu -- bash

ConfigMap

Create a configmap based on a file, directory, or specified literal value.

A single configmap may package one or more key/value pairs.

When creating a configmap based on a file, the key will default to the basename of the file, and the value will default
to the file content. If the basename is an invalid key, you may specify an alternate key.

When creating a configmap based on a directory, each file whose basename is a valid key in the directory will be
packaged into the configmap. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks,
devices, pipes, etc).

# Create a new configmap named my-config based on folder bar
kubectl create configmap my-config --from-file=path/to/bar