Skip to content

Files

Latest commit

author
Kim Schlesinger
Aug 25, 2021
8b27617 · Aug 25, 2021

History

History

job

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 25, 2021
Aug 25, 2021

Generate UUID

This is a Kubernetes manifest that creates a Job. The Job creates a pod running an Ubuntu container, and the generates a list of test emails with UUIDS. The pod will run for 60 seconds and then terminate.

The original commands are from the DigitalOcean Tutorial How To Generate Universally Unique Identifiers (UUIDs) with uuidgen.

Here's the kind of output you should see when you look at the logs for the pod:

Run on a Kubernetes Cluster

Clone this repository and change into the daemonset directory

git clone https://github.com/do-community/example-k8s-workloads/ && \
cd example-k8s-workloads/job

Apply the Job manifest

kubectl apply -f job.yaml

See the Logs

To see the message, first find all the nodename pods

kubectl get pods

You will see one po that start with the prefix uuidgen- followed by a hash.

To see the logs for a pod, copy the pod name and run

kubectl logs <pod_name>

You should see the message above with the node name that your pod is running on.

Delete the Job

kubectl delete job uuidgen