<?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 Andre Tost on Medium]]></title>
        <description><![CDATA[Stories by Andre Tost on Medium]]></description>
        <link>https://medium.com/@andretost_75145?source=rss-a730b40221b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L0XyrarTWtIQhxfWZPPweA.jpeg</url>
            <title>Stories by Andre Tost on Medium</title>
            <link>https://medium.com/@andretost_75145?source=rss-a730b40221b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:07:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andretost_75145/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[How do you measure success with AI?]]></title>
            <link>https://medium.com/@andretost_75145/how-do-you-measure-success-with-ai-4ded371c4231?source=rss-a730b40221b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ded371c4231</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[spec-driven-development]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Andre Tost]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 12:57:00 GMT</pubDate>
            <atom:updated>2026-08-14T12:57:00.156Z</atom:updated>
            <content:encoded><![CDATA[<p>I keep seeing so many articles and posts, where people describe (or should I say show off) their experience with whatever AI tool they are promoting. And so many of them seem to measure their success through the sheer volume of what they have generated. Or rather, what they made the AI tool generate for them. Code. Documents. Powerpoint presentations. Meeting transcripts. Strategy proposals. The more the better. After all, it shows how clever you are, how you are well versed with this new technology, ready to embrace it in your everyday professional life.</p><p>There was also a time, not that long ago, where the degree of AI maturity of individuals and the organizations they work in was measured simply by the number of tokens they would consume. The more you talk to your LLM, and the more it talks back at you, the more productive you must be, right? Really?</p><p>We’re thankfully past this last part, it seems. Not necessarily because it was recognized that it was nonsense. But because it became too expensive. It also starts influencing the first part above, about this generation of seemingly random things, without any regard of its quality and usefulness. Enterprises like to see their employees embrace AI — but they’re shocked by the bill it produces. And that’s not even accounting for the fact that virtually none of the AI companies are even remotely profitable; they’re all selling their AI machineries below cost.</p><p>Besides the expensive nature of this inflationary use of AI, it raises serious questions about the quality of what is being produced. I would assert that all the documentation for code that is generated is only read by AI. In other words, the AI generates things that only another AI will ever look at. No human in the loop at all. If no one is actually looking at code anymore, then why document it to begin with? Or rather, what is the right abstraction level of documentation? I think the notion of spec-driven development is leading us in the right direction. (Don’t know what it is? Search for articles about it — or ask your AI.) At the very core of it is, in my opinion, the realization that you don’t carefully craft and document the output (the code) anymore, you carefully craft and document and maintain the input. The content you are feeding the AI with: the prompts, the skills, the rules, whatever it is that helps you get the AI to build good outcomes. And unlike in spec-driven development, this should extend into non-code use cases, as well.</p><p>It’s becoming less and less interesting for me to read “here is my GitHub repo, it has all the clever code in it for this app” or “here is a Powerpoint presentation that I generated all by myself in no time”. Earlier, I saw a post that said “instead of a press release to announce our newest product, we simply AI-generated cool video.” Not even my AI knows what to do with something like that!</p><p>What I am looking for instead is “here is what I fed to my AI model to produce this app”, or “here is the information I had to pass to my model to get this presentation created”. The related artifacts, and I don’t think it is ever “just a prompt saying ‘do it’”, should be treated as first class artifacts. And the quality of these artifacts should be measured by their applicability to broader set of uses cases, their repeatability, their stability, etc, all reflected by the quality of what they can help me produce.</p><p>In my opinion, we need a new class of entity (sorry, I couldn’t come up with a better term), both for IT (apps, scripts, data, etc) and for business (documents, analyses, data, etc) that lets us measure the true success and quality of what enterprise professionals do with AI.</p><p>(As always, every word of this was written, reviewed and proofread by my own brain and nothing else.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ded371c4231" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI (not just) Code Assistants: IBM Bob versus Cursor]]></title>
            <link>https://medium.com/@andretost_75145/ai-not-just-code-assistants-ibm-bob-versus-cursor-df414ca59c64?source=rss-a730b40221b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/df414ca59c64</guid>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[ai-code-assistant]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-tools]]></category>
            <category><![CDATA[cursor]]></category>
            <dc:creator><![CDATA[Andre Tost]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 23:34:55 GMT</pubDate>
            <atom:updated>2026-01-28T23:34:55.606Z</atom:updated>
            <content:encoded><![CDATA[<p>I have recently started using <a href="https://www.ibm.com/products/bob">IBM Bob</a>, and I have been using <a href="https://cursor.com/">Cursor</a> for a bit longer, so I thought it might be a good idea to write down a comparison. Note that this is not a formal product review. I still consider myself somewhat of an amateur user, and I have this bad habit of not reading documentation; instead, I install things and start using them and hope they’ll be intuitive enough to make me productive right away.</p><p>A consequence is that there may be features I will note as missing or not working well below, even though they are nicely supported in the product, and I simply haven’t found them.</p><p>I have not tried to run the exact same project with both to have a direct head-to-head comparison. Part of the reason being that I don’t want to solve the same problem twice — I have enough projects I want to run, and not enough time to run them.</p><p>There is also a technical problem, and that will be my first report of a missing feature, this time in IBM Bob: I have an Nvidia DGX Spark system, it has a nice GPU on it and lots of memory, so that I run virtually all of my AI experiments on it. That system does not have a UI, it’s really just a server. With Cursor, I can run the tool on my MacBook and use the ssh extension to execute commands on the DGX box, as well as storing and editing files on it. <br> I have failed to get any ssh extension to work with IBM Bob. Maybe that’s by design, or maybe it’s a bug of sorts, but bottom line is that I cannot run projects targeting my DGX Spark with IBM Bob. Bummer.<br>This point goes to Cursor for sure.</p><p>One thing I also want to mention upfront, before getting into details: they are both extremely powerful, with potential to revolutionize the way we work, in my opinion. So which one you use doesn’t really matter all that much, as long as you use <em>something</em> and don’t put your head in the sand.</p><p>Both work really well with git and GitHub, and I love that! Everything I do gets stored and maintained in a repo, it is there for later use by myself or others, and doesn’t get lost in some folder on my laptop that I soon forget about. If you’re doing work in an enterprise context, you will hopefully do that already anyway. By the way, I seem to remember that Bob automatically created a solid .gitignore file for me; Cursor didn’t.</p><p>IBM Bob has a built-in catalog of tools that I can install, and GitHub is one of them. Nice! Cursor lets me install MCP servers, but doesn’t come with any out of the box. Clearly a point for Bob.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*114Fg89pYZ6686apWNmJLw.png" /><figcaption>IBM Bob MCP marketplace</figcaption></figure><p>They use VS Code as the IDE and add a window in which you can chat with them. They use AI models under the covers, of course. Cursor will let you choose which model you want to use, Bob doesn’t. At first I thought that’s not good, please let me choose which model I want. I have changed my mind, though. I don’t know why I would use Sonnet over Opus, or GPT Codex. Just get the job done and use the best model for the job. Neither of them let me use my own local model, by the way.<br>A point for Bob, but I could see how you would give that point to Cursor if you like to have control over models.</p><p>Both of them have “modes”, which make them behave in certain ways. For example, both have “plan” modes. In this mode, they don’t generate code or anything like that, they make a plan for how to approach the given task and let you refine that plan with them. That’s good. IBM Bob will automatically generate a to-do list and store the plan in a markdown file; Cursor doesn’t. Bob beats Cursor in that respect, in my opinion, and that continues in later stages of the project: Bob will create documentation that captures what was done and why, and Cursor doesn’t, unless I ask it to. I could probably add a rule to Cursor to change that behavior. So, a point for Bob for documenting a lot. It does lead to the need for one final prompt when the project is complete, though: “Please consolidate all documentation into a single readme, and remove data that was just for troubleshooting and which is no longer relevant.” I shouldn’t even have to ask, right?</p><p>Once we have a plan, we can start executing. Bob has a “Code” mode, Cursor doesn’t for some reason. Bob will ask you to go into Code mode when the time comes, and it will offer a simple button to click to switch the mode. Cursor will simply tell you “you need to go and switch the mode now”. I’m nitpicking, but still.</p><p>IBM Bob will start creating files (asking permissions based on how you set auto-approve options) and run commands as it sees fit. Cursor will do that, too, but only after I told it “please go ahead and create files and run things now”. I know, nitpicking yet again.<br>This one is a tie, in my opinion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0JAlC02nApApy1ng635FQ.png" /><figcaption>Cursor working on a Docker project</figcaption></figure><p>When executing on the project — creating and editing files, running commands, reviewing logs for troubleshooting etc — both of them are just fun to watch. They always seem to know what to do to make progress, which is really nice. It almost makes you think you could give them a job to do, leave them to it and go to the beach for the day. Unfortunately, that’s not how it works. Sooner or later they’ll get stuck and start digging themselves into a hole, as I call it. They almost never will admit that they have hit a dead end, need to undo some of what they have done and take a different approach. That is for me to do, when I see that we’re stuck in an endless troubleshooting loop. And for me to be able to do that, I need to know what is happening. I have to have experience in the problem at hand. I have said it in a previous article, that there is actually good news here, in my opinion: good software engineering is still a required skill. And it makes me feel good, of course, if I can teach this super smart model a trick or two it didn’t know.</p><p>Anyway, what shows here is that they are probably both using the same model in the background, because they are going about this in basically the same way (I should have mentioned that I am using Opus 4.5 in Cursor). So this is a tie again.</p><p>Both of them make mistakes, too. They will generate code that doesn’t work, and when you tell them “This code doesn’t work”, they will answer something like “Great catch!” Oh well. Like I said, human supervision is still required.</p><p>More nitpicking, anyone? Bob has “findings”, things that it has observed that might be of interest. For my last project, the findings box said “No findings to display”, so I’m not sure what actually to expect. Supposedly it would tell me if I had vulnerabilities in my code, so that’s useful. <br>Cursor lets you use voice input, IBM Bob doesn’t.</p><p>With Bob, you can define which type of actions require your approval, versus whether the tool can just go ahead and execute them. I have not found such a feature in Cursor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*4huOIXw_qsCk2N8R1s2T3Q.png" /><figcaption>Auto-approve settings in IBM Bob</figcaption></figure><p>Cursor has a concept called “Rules, Skills, Subagents”. I have to shamefully admit that I haven’t tried it yet, but it sounds very very powerful, so I need to get on it. Lots of rules I can think of already that I want Cursor to follow for me. I’m sure the IBM Bob team will add something like this soon if they haven’t already.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j48FBUqhK45aQCvsdsG-oA.png" /><figcaption>Rules, Skills, Subagents in Cursor</figcaption></figure><p>Finally, a word on tokens. The models backing these tools have limited size context windows, and even though it is hundreds of thousands of token, blasting through all of them in a project is not hard. Partially that is due to their own chattiness. I really want to add rules to both of them asking them to be crisper and not talk so much! IBM Bob lets you keep track of where things stand, both in terms of the current context as well as for the overall quota that was allocated. At IBM, I was given a quota that gets refreshed once a month, and if I am not careful I run out and then have to be without Bob for some time — can you imagine??</p><p>I like that Bob tells me at any point in time what my context window size is. It is even smart enough to reset it at times, basically saying “I don’t need to include the entire history of this chat, I can just use the documents I created along the way.” Very clever! Cursor does not seem to offer this, even though there is limited quota for tokens there, too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*neaOVZWJ4emqPo7Hf2fOJQ.png" /><figcaption>Context length display in IBM Bob</figcaption></figure><p>Time to declare a winner. To me, it’s IBM Bob!</p><p>And hopefully the examples above made it clear why I am declaring Bob the winner. It’s all little things, but they are things that matter and they add up. I’m sure both tools will continue to evolve at breakneck speed and it will be interesting what they come up with.</p><p>As I said in the beginning, it is all that important which one of these you use (if in doubt, of course, use the one from IBM!), but this type of tool should become the personal assistant for every part of IT for everyone. Not just coding, but also deploying, configuring, operating, troubleshooting systems, creating documentation, executing automated tests and benchmarks, you name it. And I’m sure that Bob could have written this article for me; but I ended up writing it all by myself, because I think Bob might have been even more biased than I am.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df414ca59c64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy an AI Chat Server on an IBM Fusion HCI with IBM Bob in 20 minutes — without typing…]]></title>
            <link>https://medium.com/@andretost_75145/how-to-deploy-an-ai-chat-server-on-an-ibm-fusion-hci-with-ibm-bob-in-20-minutes-without-typing-187d01700569?source=rss-a730b40221b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/187d01700569</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[ibm-fusion]]></category>
            <category><![CDATA[llama-cpp]]></category>
            <dc:creator><![CDATA[Andre Tost]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 00:06:43 GMT</pubDate>
            <atom:updated>2026-01-08T05:11:41.214Z</atom:updated>
            <content:encoded><![CDATA[<p>How to deploy an AI Chat Server on an IBM Fusion HCI with IBM Bob in 20 minutes — without typing in a single command!</p><p>Yes, that is a loaded title. But if you keep reading you will realize (I hope) how cool this is.</p><p>To start with, I need to level set on a few things that are important to the understanding of what I am describing below:</p><ul><li>I am writing this in my own words, I did not ask AI to help me or generate it for me, or even edit it for me. I realize it’s not as well structured as AI would have created it, and I can only hope you’ll suffer through it to the end. And I could have told my AI “Generate this article and add a section describing how it was written by a human.” But I didn’t. Pinky swear!</li><li>There are two IBM products I used that not everyone may be familiar with:<br><strong>IBM Bob</strong> — this is an AI Coding Assistant. Runs on top of VS Code and comes with an AI agent that does all the hard work for you. He does not let you change the model that makes him smart, and I am not 100% sure which model it is using, but I suspect it is Sonnet. By the way, I will refer to Bob as “him” — I know, it’s a machine. But he comes with a really cute logo, it’s hard not to use “he/him/his”.<br><strong>IBM Fusion HCI</strong> — this is a “Datacenter-in-a-box” type system, it is compute power (including GPUs), storage, networking, virtualization etc all baked into a single pre-integrated system. And it runs Red Hat Openshift natively. This is for companies who don’t want to run their stuff in the cloud.</li><li>You may be familiar with <strong>Red Hat OpenShift</strong>. It is Red Hat’s (and also IBM’s) Kubernetes product. So you’ll see that all the software I want to run on this Fusion system runs in containers.</li><li>I used <strong>llama.cpp</strong> as the AI chat server. It’s open source software that can call a local LLM and offers a UI for the user to chat with it. See <a href="https://github.com/ggml-org/llama.cpp">https://github.com/ggml-org/llama.cpp</a>.</li></ul><p>Okay, ready to go. Here is how it began: I was given the opportunity to have some time on a rather large IBM Fusion HCI system and test some AI things on it. As I mentioned, OpenShift running on it, and OpenShift AI on top of that.</p><p>I used to do deployments on OpenShift in my sleep. All the resources — containers, storage volumes, network routes, etc — are described in YAML. I could write down the correct YAML specifying how much memory and virtual CPU to give to a container all by heart, but it’s been a while, I felt rusty. So where to start?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*Bn7krD1RtNl8WR-v1RNU1g.png" /></figure><p>Enter IBM Bob. I have been exploring him for a bit now, so I thought why not let him help me get something to run on the Fusion system. I created an empty GitHub repo (always a good idea at the start of each project), cloned it to my laptop and pointed Bob at the clone. And then entered this prompt to get things started:</p><blockquote>“I would like to deploy a large language model and talk to it through llama.cpp. I want to deploy it on Openshift (on-prem cluster), which has Openshift AI version 2.25.1 installed. The model itself should go on a PVC, and I will run it all in my own namespace. Can you help me do that?”</blockquote><p>Bob supports different modes of work, and I had him in “Plan” mode. In that mode, he won’t write code or change files, he will just, well, plan the work. He asked me a couple of follow-up questions (e.g. “Which model do you think you are going to run?”, or “Do you already know how much memory you would like to allocate for this?”, or “Do you know where I can download the model files, Huggingface or S3 or …?”), and then created a bulleted list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*p6PzmJ96ltyh0dVpkjMn-w.jpeg" /></figure><p>Oops, typo alarm! There is no model called “mistrla”. But Bob is clever, he figured it out. He didn’t even mention it.</p><p>Okay, back to the plan. It’s pretty straightforward, isn’t it? So I said let’s go, and Bob asked me if he could go into “Code” mode. I actually like that: ask me before you start messing with things. He then went on to create a set of YAML files for the various resources, as listed in the plan. He also created a shell script to automate the deployment into OpenShift. So far so good, that saved me a lot of time right there.</p><p>I then said “can you run the script to deploy all the new resources into the cluster? I have already run oc login.” That’s actually true, I had run oc login in a terminal window on my Mac to create a context for OC. But that was THE ONLY command I typed in throughout this entire exercise! Bob could have done this, too, I’m sure, but he would have asked me for the token, of course.</p><p>Bob created all the resources by running the script he had created earlier. He then went on to check on the status of the relevant pods (containers) to see if everything worked. It didn’t. Bob found a container that was in a bad state and automatically looked at the logs to find out more. Wait, that is exactly what I would have done! Alright, Bob, keep up the good work.</p><p>The logs revealed that no GPU node was available in the cluster. Bob went on to find all the GPU nodes and check on their status, and confirmed, yes, they were all taken by other work. He then suggested, and I quote, “All available GPUs on this node are currently in use. Let me create an alternative deployment configuration that can run on CPU-only, which you can use until a GPU becomes available.”</p><p>Great idea. So he created new YAML files to run this on a CPU.</p><p>I’ll skip a few steps here, but at one point, Bob got stuck: he couldn’t find the right Docker image for llama.cpp. He kept trying different tags (as in, update YAML spec with new tag, delete old deployment, replay, check pod logs), but with no success. So that created the first of what I call a “human intervention point”. I looked up the correct name and said how about we use this name? That did it.</p><p>The next human intervention point (this is #2): he picked the wrong command to start the llama-server inside the container, so the container failed each time it was started. Bob went on to try different things, none of them successful, so I decided to stop him and help him along: “you don’t need to define a command, the image has a valid entry point already built in”.</p><p>After that, it was all smooth sailing. The deployment worked, it was verified, and the test script was run successfully, truthfully telling me that the capital of France is Paris. Isn’t it nice we have LLMs to tell us things?</p><p>Time check: this took about 20 minutes. So, from the time I logged into the cluster to having a fully functional AI chat deployment up and running. Two human interventions required, everything else automatic. That’s really good!</p><p>The morning after, a good soul had freed up the GPUs, so that I could now go and try to run llama.cpp on a GPU node. I started Bob and said hey, remember we didn’t have a GPU, guess what, we have one now, so let’s use it. And off he went, creating new YAML files, deploying resources and checking on status making sure everything was going smoothly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OS-UPkypLleAQF_xjetKdQ.jpeg" /></figure><p>Until he hit the third (and final) human intervention point: he had made a mistake around the app labels, basically mixing up things between the CPU deployment and the GPU deployment, so that the route wasn’t working properly. He kept trying to fix it, but looked in all the wrong places, so I stepped in and gave a hint as to where to look (mind you, it took me a while to find it!), and even got some praise from Bob: “Great detective work!” Maybe I should have asked him to call me Sherlock from here on out?</p><p>The rest was easy, and Bob even went ahead and did some performance comparisons. I asked him (and this was important!) to summarize everything he had done, including the pitfalls and problems we ran into along the way. Then commit and push to make sure it all gets stored in git.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*Hxd62cnvgIPqICnQZ99iIQ.jpeg" /></figure><p>DONE!</p><p>Sidebar: I ran some performance numbers myself, not a proper benchmark (llama.cpp actually comes with one), and in my limited testing, the CPU based deployment created about 17 tokens per second, whereas the GPU based on created 85. Probably to be expected, but still nice to see how the GPU is just better at this type of work.</p><p>What’s next? I will run and deploy more things and see how that goes. But most importantly, this github repo I have with all the YAML files and documentation and deployment and test scripts — that is pure gold for the next Bob, umm, person that comes along wanting to do something similar. A new Bob instance would be pointed to my repo and be told “This repo has a working solution including some details to look out for, please reuse it for this new project.” <br>This approach promises to get us to a level of reuse and productivity I have not seen before. Can’t wait to see that in action!</p><p>To summarize, this exercise was nothing short of amazing for me to go through. Work that would have cost me days to do in the past is now done in minutes. I kept looking at what Bob was doing and think “Yup, that is what I would have done”, while I was sipping on my morning coffee. I could get used to that.</p><p>Heck, my grandma could have done this, right? Wrong. That’s not at all true. Bob got stuck a few times and would probably have been left stranded without me nudging him into the right direction. So there is the good news for all of us: the machines are not quite ready to replace us. Knowing what you are doing around an Openshift cluster is still required to get things to work properly. But he has made me a load more productive.</p><p>PS: if you want to check out all the content Bob generated for me, you can find it here: <a href="https://github.com/andretost/openshift-ai">https://github.com/andretost/openshift-ai</a>. And did you notice that in the text above, I used <a href="http://github.ibm.com/">github.ibm.com</a>? Yes, that is where I did all the work. But then decided to move it into public github. And who did all that work? Yes, Bob did.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=187d01700569" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ChatGPT to learn Kubernetes and OpenShift]]></title>
            <link>https://medium.com/@andretost_75145/using-chatgpt-to-learn-kubernetes-and-openshift-15051bc95535?source=rss-a730b40221b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/15051bc95535</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Andre Tost]]></dc:creator>
            <pubDate>Thu, 26 Jan 2023 21:53:01 GMT</pubDate>
            <atom:updated>2023-01-26T21:53:01.392Z</atom:updated>
            <content:encoded><![CDATA[<p>As I am writing this, the hype about ChatGPT seems to reach new heights every day. Much of what I read starts out with the question “Will the machines take over our jobs?” and ends with something like “It’s not quite there — yet!”. I won’t even try to predict where this is all going and will also refrain from pointing out that this system has obvious flaws. Instead, I would like to share what I have seen it do with respect to creating configurations for Kubernetes and, in my case, OpenShift. And I found it to be quite useful in quickly creating solid example deployments, which can serve at least as a starting point for further, more detailed work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSA6tw1AWbZS6vVs2TVNyg.jpeg" /></figure><p>I started out with what is probably one of the most common examples of learning how to deploy a workload on a Kubernetes cluster: deploying nginx, an open web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qv3_e_1SzqGXVfknkkvJA.jpeg" /></figure><p>This ask lets it generate a set of YAML definitions, specifically, a DeploymentConfig resource, a Service resource and a Route resource. All pretty straight forward so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVujHtJ84JXZcg9qZ9bLvg.jpeg" /></figure><p>A nice touch is that it also adds a brief explanation about what it did, and that makes it especially useful if you are new to Kubernetes and want to educate yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckF4ystsEFipFwTWfCyOig.jpeg" /></figure><p>One thing that you should keep in mind here is that the hostname “example.com” is only a placeholder for what a usable hostname is in the case of your environment, so you’ll have to adjust that if you want to deploy this YAML in your cluster. One option to simply remove the hostname parameter from the YAML, which will cause a working URL to be generated.</p><p>An additional consideration is that the YAML as generated will probably not get the pod deployed, because the standard nginx container requires running with privileges and by default will not work, since it will be associated with the restricted SCC. You will have to associate the default service account with the privileged SCC. And guess what? You can ask ChatGPT to tell you how and it will give you a fairly comprehensive explanation, together with the command you execute against your cluster to do it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_mCs8gAxqvo64dP2fIio3Q.jpeg" /></figure><p>Note also that it knows the difference between Kubernetes and OpenShift, because it generates resource definitions that are only used in OpenShift, for example, a Route. If you ask it to do the same, but for Kubernetes, it will generate different resources, for example, a Service resource of type LoadBalancer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRe8bNjWypZAYB86sCsyeA.jpeg" /></figure><p>My next goal was to start adding additional features to this initial deployment, beginning with making it highly available. Note that ChatGPT keeps the state of the conversation, in other words, it remember that I had asked about deploying nginx before.</p><blockquote>“can you update these YAML definitions to make the deployment highly available across three nodes in the cluster”</blockquote><p>And it promptly makes updates to the YAML, and explains what they are afterwards:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mm8-NiMt7Mo8KgY4t-qIBw.jpeg" /></figure><p>So it actually interprets what it means to say “highly available” and maps it to additional configurations like a liveliness probe or the session affinity. Of course, we can have a lengthy discussion about whether this is truly living up to the requirement to be “highly available”, but at the very least, it points out some interesting settings that play a role in it, and which you can then adjust further.</p><p>However, there is an error in this: when setting the externalTrafficPolicy to ‘local’, it should also change the service type to LoadBalancer. I assume this is a bug? I also stumbled over the node selector pointing to a label that my cluster doesn’t have. I’m not sure if this is yet another bug, or if my cluster is not properly configured. I think this comes down to the fact that you cannot assume to use these YAML files unchanged in your environment, you may have to make adjustments. And that can be another learning experience in itself!</p><p>What’s next? How about some specific settings for memory and CPU.</p><blockquote>“can you update those definitions with appropriate definitions for cpu and memory to allow for increased load”</blockquote><p>If nothing else, this gives me placeholders for those values in the configuration, and those can then be adjusted as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWZ7t8W3YToIuXFWiyBbfw.jpeg" /></figure><p>And as before, I get a brief introduction into what was added and why. This makes it turn into a sort of interactive tutorial, where I can ask questions as I go and see the various parameters being added and explained.</p><blockquote>“can we now update all this to be exposed with https, and use the OpenShift cluster’s default cert for the endpoint?”</blockquote><p>Yes, it can, and adds yet another nice brief explanation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aTypPb_054qv3i3OR6DgBg.jpeg" /></figure><p>So we deployed a workload, made it highly available, gave it some additional memory and CPU and exposed it via HTTPS. Now I wondered if I can add a storage example, so I asked it to forget about nginx (which is basically stateless), deploy a MySQL instance instead and give it storage.</p><blockquote>“can you generate the same set of YAMLs, with the same characteristics, but for a stateful deployment of a MySQL instance, including the use of dynamically allocated persistent storage?”</blockquote><p>Since it is a machine answering my requests, it has unlimited patience and thus went to work right away and created a new set of YAML definitions, this time adding a PersistentVolumeClaim, and as a nice bonus, it knew where to mount it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXl9uxLlEq3E3fBYLAq3sQ.jpeg" /></figure><p>One thing I noticed right away was that the replica number went from 3 to 1. It also removed the liveliness and readiness probes that were in the previous configurations. So it didn’t know how to deploy MySQL in a highly available fashion? Let’s put that to a test.</p><blockquote>“please change the definition so that MySQL is deployed in a highly available configuration with a single primary and two replicas”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYzmv1hZ8sY4SGj6f6vE9g.jpeg" /></figure><p>So, pretty much all it did was to change the replica number from 1 to 3. Apparently, it didn’t realize that additional configuration is needed to create a proper setup for MySQL the way I wanted it. Maybe I needed to give more specific instructions? The fact that it added more capacity to the storage volume was a nice touch, though. I’ll leave any further poking at this for some other time.</p><p>But before I let it all go, I wanted to try one more thing, namely to not have it hardcode the MySQL password into the YAML, and pull it from a secret instead (which, in my opinion, it should have done right away). And that part worked like a charm.</p><p>What would be really cool is if it could remember some standard things that I always like to see in my deployments, for example, high availability, or no hardcoded secrets, and if consequently I won’t have to define these things explicitly anymore. That would constitute a ‘learning’ model, wouldn’t it? Unfortunately, it doesn’t seem to do that, when I started a new chat and asked for a deployment of MySQL, it started out with the same basic configuration as before.</p><p>In closing, I found ChatGPT to be a great tool for learning, and learn in a very interactive way that might work better than finding tutorials and examples on the web and follow those. You can navigate the world of Kubernetes as you see fit. At least for that purpose, this tool is ideal. However, it isn’t always 100% correct (which it freely admits, doesn’t it?), and I also found that, at least in my case, it didn’t deliver the same outcome when I asked for the same thing, but with different words. Which may be another area to explore further in itself.</p><p>Image by Alexandra_Koch from Pixabay.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15051bc95535" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>