<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Janet Kuo on Medium]]></title>
        <description><![CDATA[Stories by Janet Kuo on Medium]]></description>
        <link>https://medium.com/@janetkuo?source=rss-5ea6a92ef885------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JY-6wvcP7GrtGUjhPBVPVw.jpeg</url>
            <title>Stories by Janet Kuo on Medium</title>
            <link>https://medium.com/@janetkuo?source=rss-5ea6a92ef885------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 15:41:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@janetkuo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Workloads in Kubernetes]]></title>
            <link>https://medium.com/google-cloud/running-workloads-in-kubernetes-86194d133593?source=rss-5ea6a92ef885------2</link>
            <guid isPermaLink="false">https://medium.com/p/86194d133593</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Janet Kuo]]></dc:creator>
            <pubDate>Sat, 08 Apr 2017 20:22:27 GMT</pubDate>
            <atom:updated>2017-04-18T21:27:39.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Pf1OiWyywWNKG_NMyt6ZA.jpeg" /><figcaption>KubeCon Europe 2017 in Berlin</figcaption></figure><p><em>This post is based on my talk at </em><a href="http://events.linuxfoundation.org/events/cloudnativecon-and-kubecon-europe"><em>KubeCon Europe</em></a><em> 2017. The </em><a href="https://www.youtube.com/watch?v=spHPCc82ACs&amp;list=PLj6h78yzYM2PAavlbv0iZkod4IVh_iGqV&amp;index=79"><em>recording</em></a><em>, </em><a href="https://speakerdeck.com/janetkuo/kubecon-europe-2017-running-workloads-in-kubernetes"><em>slides</em></a><em>, and </em><a href="https://github.com/JanetKuo/k8s-demos"><em>demos</em></a><em> of this talk are all available. In this talk, I gave an overview of built-in controllers in Kubernetes. The intended audience is Kubernetes beginners.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fspeakerdeck.com%2Fplayer%2F2408a9ed8da04f6aa27a10658317b4f0&amp;url=https%3A%2F%2Fspeakerdeck.com%2Fjanetkuo%2Fkubecon-europe-2017-running-workloads-in-kubernetes&amp;image=https%3A%2F%2Fspeakerd.s3.amazonaws.com%2Fpresentations%2F2408a9ed8da04f6aa27a10658317b4f0%2Fslide_0.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=speakerdeck" width="710" height="463" frameborder="0" scrolling="no"><a href="https://medium.com/media/b20a73a5d674cd6420c2ccbea2b2f5d1/href">https://medium.com/media/b20a73a5d674cd6420c2ccbea2b2f5d1/href</a></iframe><p>You may remember that, the AWS outage happened last month <a href="https://techcrunch.com/2017/02/28/amazon-aws-s3-outage-is-breaking-things-for-a-lot-of-websites-and-apps/">broke lots of popular websites and applications</a>. After the incident, <a href="https://twitter.com/robertjscott">Rob Scott</a>, VP of Software Architecture at Spire, shared a story of how Spire <a href="https://medium.com/spire-labs/mitigating-an-aws-instance-failure-with-the-magic-of-kubernetes-128a44d44c14">mitigated AWS outage with the magic of Kubernetes</a>.</p><h3>Rob Scott on Twitter</h3><p>So @kubernetesio is basically magic. It automatically redistributed our systems after instance failure in today&#39;s AWS outage - no downtime.</p><p><a href="https://kubernetes.io/">Kubernetes</a> is a platform for containerized <em>application patterns</em>. These patterns make applications easier to deploy, to administer, to scale, and to recover from failures — that’s the magic.</p><h4>What’s in a Kubernetes Cluster?</h4><p>Here is a simplified Kubernetes cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmwvGTEMIbf0q5OjRbTQpA.png" /><figcaption>A simplified Kubernetes cluster</figcaption></figure><p>A <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/"><em>pod</em></a> is the smallest and simplest unit that you create or deploy in Kubernetes. A single pod has usually one, or sometimes several tightly coupled containers, and their shared resources. A pod represents a single instance of an application in Kubernetes.</p><p><em>Controller</em> is a higher level of abstraction in Kubernetes. Each controller represents one application pattern. A controller (the red square in the above diagram) manages copies of pods for a specific application pattern. Therefore, you don’t need to create pods directly. Instead, you create controllers to run applications in patterns.</p><p>A <a href="https://kubernetes.io/docs/concepts/nodes/node/"><em>node</em></a> is a physical or virtual machine. The <em>master node</em> makes global decisions about the cluster, and the <em>worker nodes</em> maintain pods and provide them running environment. Controllers run on the master node, and manage pods running on the worker nodes.</p><p>In this post, I’ll discuss 4 general patterns in Kubernetes: stateless, stateful, daemons, and batch. Again, each pattern is represented by one controller.</p><h4>Stateless Pattern: Deployment</h4><p><em>Stateless</em> means that you don’t need to keep state (persistent data) in your workloads. The controller for stateless pattern is called <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/"><em>Deployment</em></a>. If you want to manage and scale stateless workloads, such as your web applications, mobile backends, or API servers, Deployment is the controller for you.</p><p>Deployment leans towards <em>availability</em> than consistency [1]. Deployment provides availability by creating multiple copies of the same pod. Those pods are disposable — if they become unhealthy, Deployment will just create new replacements. What’s more, you can update Deployment at a controlled rate, without a service outage. When an incident like the AWS outage happens, your workloads will automatically recover.</p><ul><li>Concrete examples: <a href="https://www.nginx.com/">nginx</a>, <a href="http://tomcat.apache.org/">Tomcat</a></li></ul><p>Below is a demo of deploying and rolling updating a stateless application with Deployment. In this demo, I used the Kubernetes CLI tool, kubectl, to interact with the cluster. kubectl makes asynchronous requests to the controller, tells the controller what the desired state is, and the controller will just make it so. I also created <a href="https://kubernetes.io/docs/concepts/services-networking/service/"><em>Service</em></a> in the demo. Services front applications. You don’t talk to pods directly, but talk to Services. Services load balance traffic to healthy pods, so that when any pod becomes unhealthy or is being terminated, your service is still available.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAcPTIUu-UHA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAcPTIUu-UHA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAcPTIUu-UHA%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e0e9b4193ae23946ce61d01bb2b3d1c/href">https://medium.com/media/7e0e9b4193ae23946ce61d01bb2b3d1c/href</a></iframe><h4>Stateful Pattern: StatefulSet</h4><p>For stateless applications, scale and recover is easy. However, some of your applications need to store data, like databases, cache, and message queues. <br>If you’re running distributed stateful workloads, such as Zookeeper, each of your stateful pod will need a stronger notion of identity.</p><p>The pods created by Deployment won’t have the same identity after being killed and recreated, and they don’t have unique persistent storage either. Therefore, we need another controller for stateful pattern: <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/"><em>StatefulSet</em></a>. Unlike Deployment, StatefulSet chooses <em>consistency</em> over availability. StatefulSet also manages multiple pods, but unlike Deployment, each pod of a StatefulSet has stable, unique, and sticky identity and storage. That is to say, each pod is similar but slightly different. With StatefulSet, you can deploy, scale, and delete pods in order. This is safer, and makes it easier for you to reason about your stateful applications.</p><ul><li>Concrete examples: <a href="https://zookeeper.apache.org/">Zookeeper</a>, <a href="https://www.mongodb.com/">MongoDB</a>, <a href="https://www.mysql.com/">MySQL</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfkPCskxXZdI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfkPCskxXZdI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfkPCskxXZdI%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8fbf5270aabec7309d24756541ba63bc/href">https://medium.com/media/8fbf5270aabec7309d24756541ba63bc/href</a></iframe><h4>Daemon Pattern: DaemonSet</h4><p>Sometimes, you want to run daemon-like workloads on your nodes, such as running logs collection daemons or node monitoring daemons. In this case, you use <a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/"><em>DaemonSet</em></a>.</p><p>DaemonSet makes sure that every node runs a copy of a pod. If you add or remove nodes, pods will be created or removed on them automatically. If you just want to run the daemons on some of the nodes, use node labels to control it — put some labels on nodes, and tell the DaemonSet “Hey, run DaemonSet pods only on nodes with these labels.”</p><ul><li>Concrete examples: <a href="http://www.fluentd.org/">fluentd</a>, <a href="https://linkerd.io/">linkerd</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBrhUtbS5th0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBrhUtbS5th0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBrhUtbS5th0%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bad029e19ced2cdf6e4665d93167c69/href">https://medium.com/media/4bad029e19ced2cdf6e4665d93167c69/href</a></iframe><h4>Batch Pattern: Job</h4><p>You might also need to run batch processing workloads in your clusters. The controller for batch workloads is called <a href="https://kubernetes.io/docs/concepts/jobs/run-to-completion-finite-workloads/"><em>Job</em></a>.</p><p>Job creates multiple pods running in parallel. You can specify how many number of pods need to complete in this Job. Job is designed for parallel processing of independent but related work items. This can be the emails to be sent, or the frames to be rendered.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fv_DJPMLeWmc%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv_DJPMLeWmc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fv_DJPMLeWmc%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fc30cf6f039bf1c83e3d61cecee5794/href">https://medium.com/media/9fc30cf6f039bf1c83e3d61cecee5794/href</a></iframe><h4>Summary</h4><p>So these are the only patterns that are supported in Kubernetes, right? No! They’re just the most common, general patterns that are supported in Kubernetes. In summary:</p><ul><li>Stateless pattern: use Deployment that provides availability, to scale and recover easily</li><li>Stateful pattern: use StatefulSet for consistency, to give each pod a unique and sticky identity and storage, and to deploy, scale, terminate in order</li><li>Daemon pattern: use DaemonSet, which runs one pod per node by default, or can be customized using node labels</li><li>Batch pattern: use Job to run multiple pods in parallel and run them to completion</li></ul><p>Now, a question you may have is “This sounds great, but where do I start? Are there examples or tools for me to move my workloads to Kubernetes?”</p><p>Yes! There are lots of great tools for you to start with, and one of which is <a href="https://helm.sh/">Helm</a>. Helm is the Kubernetes package manager. With Helm, you can download and install <a href="https://kubeapps.com/">helm charts</a>, the curated Kubernetes-native applications, and you start from there.</p><p>Another question you might have is “What if I need to run other patterns in Kubernetes? How do I customize?”</p><p>Kubernetes is extensible. It provides all the essential primitives, so you can write your own controllers, or use controllers others wrote. For example, <a href="https://github.com/upmc-enterprises/elasticsearch-operator">ElasticSearch Operator</a> and <a href="https://github.com/coreos/etcd-operator">etcd Operator</a>.</p><p>Kubernetes is open. It’s open for suggestions and feedback. You can send a patch or file a bug report to <a href="https://github.com/kubernetes/kubernetes/">Kubernetes GitHub repo</a>, or chat with us on <a href="http://slack.k8s.io/">Slack</a>. You can also follow the latest Kubernetes news on Twitter <a href="https://twitter.com/kubernetesio">@kubernetesio</a>. If you have questions or want to follow up, you’re more than welcome to find <a href="https://twitter.com/janet_kuo">me</a> on Twitter as well.</p><p>Hope you enjoy the post!</p><blockquote>1. <a href="https://en.wikipedia.org/wiki/CAP_theorem">https://en.wikipedia.org/wiki/CAP_theorem</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86194d133593" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/running-workloads-in-kubernetes-86194d133593">Running Workloads in Kubernetes</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to make a Slack bot speak Kubernetes]]></title>
            <link>https://medium.com/bottutorials/how-to-make-a-slack-bot-speak-kubernetes-e7929f51c741?source=rss-5ea6a92ef885------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7929f51c741</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Janet Kuo]]></dc:creator>
            <pubDate>Thu, 28 Jul 2016 05:23:16 GMT</pubDate>
            <atom:updated>2017-04-19T05:09:30.495Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*gyFWXknrGgjxdyuh5Qfo7g.png" /><figcaption>Kubernetes: automated container deployment, scaling, and management</figcaption></figure><p>It all started a month ago when <a href="https://medium.com/u/9e783a6f12f6">Kelsey Hightower</a> challenged the <a href="http://kubernetes.io/">Kubernetes</a> team to create a Kubernetes cluster from scratch in 45 minutes (without using <a href="https://cloud.google.com/container-engine/">Google Container Engine</a> or any <a href="http://kubernetes.io/docs/getting-started-guides/gce/#starting-a-cluster">scripts</a>).</p><h3>Kelsey Hightower on Twitter</h3><p>Advocating for users is the best part of my job. Here&#39;s how I collaborate with the Kubernetes engineering teams.pic.twitter.com/OBDYD9fshT</p><blockquote>When your engineers have the same problems as the people they are building things for, watch how fast the problems get fixed. — Kelsey Hightower</blockquote><p>Today, we had Kubernetes user empathy session round two!</p><h3>Kelsey Hightower on Twitter</h3><p>Kubernetes user empathy session round two! Continually making Kubernetes the best automation platform on the planet.pic.twitter.com/UEdyXPjtlS</p><p>The challenge my group (Brian Grant + me) picked was “Use the Kubernetes API to scale a <a href="http://kubernetes.io/docs/user-guide/deployments/">Deployment</a> from a Slack channel.” It was enlightening and fun building a slack bot that talks to a Kubernetes cluster. Here, I’ll show you how we created the bot.</p><h4>Prerequisite</h4><p>First, you’ll need a Kubernetes cluster. You can start with creating a Kubernetes cluster with Google Container Engine following the <a href="https://cloud.google.com/container-engine/docs/quickstart">quickstart</a>.</p><h4>Slack Token and Channels</h4><p><a href="https://my.slack.com/services/new/bot">Create a new bot user</a> in your Slack team (see <a href="https://api.slack.com/bot-users">Slack bot users</a> for more details), and get an authentication token. Then invite your bot to the appropriate channels.</p><p>You also need to get the channel ids:</p><pre><a href="https://slack.com/api/channels.list?token=">https://slack.com/api/channels.list?token=</a>{YOUR_TOKEN}</pre><h4>Create a Secret</h4><p>Let’s create a Kubernetes <a href="http://kubernetes.io/docs/user-guide/secrets/">Secret</a> to hold your sensitive information.</p><pre>kubectl create secret generic kubebot --from-literal=token=&lt;your_token_here&gt; --from-literal=channel=&lt;your_channel_id_here&gt;</pre><h4>Create a Deployment</h4><p>Lastly, create the following kubebot <a href="http://kubernetes.io/docs/user-guide/deployments/">Deployment</a> that consumes the secret you just created, and that’s it!</p><pre>kubectl create -f kubebot.yaml</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4d79633444707b794523d8db8b47551/href">https://medium.com/media/f4d79633444707b794523d8db8b47551/href</a></iframe><p><em>Note that you can adjust the environment variable in your kubebot container to control who the kubebot will listen to, and what valid kubectl commands are allowed.</em></p><h4>Interact with the Bot</h4><p>Now, start asking the bot to run those <a href="http://kubernetes.io/docs/user-guide/kubectl/kubectl/">kubectl</a> commands for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*KF2LBAcq-G7NrV7fNiFWqQ.png" /></figure><p>You can read the source code of the kubebot in <a href="https://github.com/janetkuo/kubebot">janetkuo/kubebot</a> GitHub repo (forked from <a href="https://github.com/harbur/kubebot">harbur/kubebot</a>). It’s a <a href="https://github.com/go-chat-bot/bot">Slack bot written in golang</a> that runs kubectl when admins ask it to.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7929f51c741" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bottutorials/how-to-make-a-slack-bot-speak-kubernetes-e7929f51c741">How to make a Slack bot speak Kubernetes</a> was originally published in <a href="https://medium.com/bottutorials">Dev Stash</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[University of Washington]]></title>
            <link>https://medium.com/@janetkuo/test-a9e20df81851?source=rss-5ea6a92ef885------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9e20df81851</guid>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[seattle]]></category>
            <category><![CDATA[beautiful]]></category>
            <dc:creator><![CDATA[Janet Kuo]]></dc:creator>
            <pubDate>Sat, 02 May 2015 15:59:16 GMT</pubDate>
            <atom:updated>2015-05-04T18:12:22.869Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Beautiful Campus</h4><p>As a recent graduate from University of Washington, one of <a href="http://www.thebestcolleges.org/most-beautiful-campuses/">the most amazing college campuses</a>, I want to share its beauty with you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3O_Je-leAHa63Ok1pM5Gw.jpeg" /><figcaption>When you see cherry blossoms, you know Spring has arrived.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DhJ4d9Xb2wq8h0rRovLbJA.jpeg" /><figcaption>Don’t worry if you missed the cherry blossoms, the campus stays amazing.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ra4TWh8Sa-GoCMdNRcvZ9A.jpeg" /><figcaption>In a sunny day, you can see Mt. Rainier directly from the campus.</figcaption></figure><p><em>All photos were taken by me using iPhone 5s. Thank you technology!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9e20df81851" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>