Home Explore Blog CI



kubernetes

2nd chunk of `content/en/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_11.md`
718179590b01723ae9eab62f24e7d09255aebfba7d0e68df0000000100000f31
    * how does rollback work: ctrl-c, rollout v2 v1. rollback pattern can be in person's head. 2 kinds of rollback: i'm at steady state and want to go back, and i've got canary deployment and hit ctrl-c how do i get rid of the canary deployment (e.g. new is failing). ctrl-c might not work. delete canary controller and its pods. wish there was a command to also delete pods (there is -- kbectl stop). argument for not reusing name: when you move fwd you can stop the new thing and you're ok, vs. if you replace the old one and you've created a copy if you hit ctrl-c you don't have anything you can stop. but you could wait to flip the name until the end, use naming convention so can figure out what is going on, etc.

    * two different experiences: (1) i'm using version control, have version history of last week rollout this week, rolling update with two files -> create v2, ??? v1, don't have a pet - moved into world of version control where have cumulative history and; (1) imperative kubectl v1 v2 where sys takes care of details, that's where we use the snapshot pattern.

* other imperative commands

    * run-container (or just run): spec command on command line which makes it more similar to docker run; but not multi-container pods.

    * \--forever vs. not (one shot exec via simple command).

    * would like it go interactive - run -it and runs in cluster but you have interactive terminal to your process.

    * how do command line args work. could say --image multiple times. will cobra support? in openshift we have clever syntax for grouping arguments together. doesn't work for real structured parameters.

    * alternative: create pod; add container add container ...; run pod -- build and don't run object until 'run pod'.

        * \-- to separate container args.

        * create a pod, mutate it before you run it - like initializer pattern.
* kind discovery

    * if we have run and sometimes it creates an rc and sometimes it doesn't, how does user know what to delete if they want to delete whatever they created with run.

    * bburns has proposal for don't specify kind if you do command like stop, delete; let kubectl figure it out.

    * alternative: allow you to define alias from name to set of resource types, eg. delete all which would follow that alias (all could mean everything in some namespace, or unscoped, etc.) - someone explicitly added something to a set vs. accidentally showed up like nodes.

    * would like to see extended to allow tools to specify their own aliases (not just users); e.g. resize can say i can handle RCs, delete can say I can handle everything, et.c so we can automatically do these things w/o users have to specify stuff. but right mechanism.

    * resourcebuilder has concept of doing that kind of expansion depending on how we fit in targeted commands. for instance if you want to add a volume to pods and rcs, you need something to go find the pod template and change it. there's the search part of it (delete nginx -> you have to figure out what object they are referring to) and then command can say i got a pod i know what to do with a pod.

    * alternative heuristic: what if default target of all commands was deployments. kubectl run -> deployment. too much work, easier to clean up existing CLI. leave door open for that. macro objects OK but a lot more work to make that work. eventually will want index to make these efficient. could rely more on swagger to tell us types.

2\. paul/downward api: env substitution

  * create ad-hoc env var like strings, e.g. k8s_pod_name that would get sub'd by system in objects.
  * allow people to create env vars that refer to fields of k8s objects w/o query api from inside their container; in some cases enables query api from their container (e.g. pass obj names, namespaces); e.g. sidecar containers need this for pulling things from api server.

Title: Kubernetes Community Hangout - April 10, 2015: Rollback Strategies, Imperative Commands, Kind Discovery, and Downward API
Summary
The Kubernetes community discussed rollback strategies, including handling steady-state rollbacks and canary deployments, and the trade-offs of reusing names. They also explored imperative commands like 'run-container' and 'run,' focusing on command-line arguments, interactive execution, and the creation/mutation of pods before running. Additionally, they addressed 'kind discovery,' enabling kubectl to identify resource types for commands like 'stop' and 'delete,' and potential aliasing mechanisms. The discussion concluded with the Downward API, specifically ad-hoc environment variable substitution for Kubernetes objects.