Git Product home page Git Product logo

cnat's Introduction

cnat

The cnat (cloud native at) command extends Kubernetes to run a command at a certain point in time in the future, akin to the Linux at command.

Let's say you want to execute echo YAY at 2am on 3rd July 2019. Here's what you would do (given the cnat CRD has been registered and the according operator is running):

$ cat runat.yaml
apiVersion: cnat.programming-kubernetes.info/v1alpha1
kind: At
metadata:
  name: example-at
spec:
  schedule: "2019-07-03T02:00:00Z"
  command: "echo YAY"


$ kubectl apply -f runat.yaml
cnat.programming-kubernetes.info/example-at created

$ kubectl get at
NAME               AGE
example-at         20s

$ kubectl logs example-at-pod
YAY

Note that the execution time (schedule) is given in UTC.

In order to use the cnat custom resource, you have to run the respective custom controller, implemented here in three different ways:

cnat's People

Contributors

kishoregv avatar mhausenblas avatar sslavic avatar sttts avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.