<?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 Umut G on Medium]]></title>
        <description><![CDATA[Stories by Umut G on Medium]]></description>
        <link>https://medium.com/@hugokce?source=rss-25f2b5954594------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Umut G on Medium</title>
            <link>https://medium.com/@hugokce?source=rss-25f2b5954594------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 14:47:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hugokce/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[Install Docker & Kubernetes & Helm On Ubuntu]]></title>
            <link>https://medium.com/@hugokce/install-docker-kubernetes-helm-on-ubuntu-287b9952dd6b?source=rss-25f2b5954594------2</link>
            <guid isPermaLink="false">https://medium.com/p/287b9952dd6b</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Umut G]]></dc:creator>
            <pubDate>Fri, 08 Mar 2024 12:19:25 GMT</pubDate>
            <atom:updated>2024-03-08T12:19:25.228Z</atom:updated>
            <content:encoded><![CDATA[<p>Install Docker &amp; Kubernetes &amp; Helm On Ubuntu</p><p><strong>Install Docker</strong></p><p># Add Docker’s official GPG key:<br>sudo apt-get update<br>sudo apt-get install ca-certificates curl gnupg<br>sudo install -m 0755 -d /etc/apt/keyrings<br>curl -fsSL <a href="https://download.docker.com/linux/ubuntu/gpg">https://download.docker.com/linux/ubuntu/gpg</a> | sudo gpg — dearmor -o /etc/apt/keyrings/docker.gpg<br>sudo chmod a+r /etc/apt/keyrings/docker.gpg</p><p># Add the repository to Apt sources:<br>echo \<br> “deb [arch=$(dpkg — print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] <a href="https://download.docker.com/linux/ubuntu">https://download.docker.com/linux/ubuntu</a> \<br> $(. /etc/os-release &amp;&amp; echo “$VERSION_CODENAME”) stable” | \<br> sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null<br>sudo apt-get update</p><p>sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</p><p>sudo docker run hello-world</p><p>sudo service docker start<br>sudo docker run hello-world</p><p><strong>Install Minikube</strong></p><p>$ curl -LO <a href="https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64">https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64</a><br>$ sudo install minikube-linux-amd64 /usr/local/bin/minikube</p><p>$ minikube version</p><p>Install Kubectl</p><p>$ chmod +x kubectl<br>$ sudo mv kubectl /usr/local/bin/</p><p>$ kubectl version -o yaml</p><p>$ minikube start — driver=docker</p><p>minikube status</p><p>$ kubectl get nodes<br>$ kubectl cluster-info</p><p>$ kubectl create deployment nginx-web — image=nginx<br>$ kubectl expose deployment nginx-web — type NodePort — port=80<br>$ kubectl get deployment,pod,svc</p><p>$ curl -fsSL -o get_helm.sh <a href="https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3">https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3</a><br>$ chmod 700 get_helm.sh<br>$ ./get_helm.sh</p><p>minikube addons list</p><p>$ minikube addons enable dashboard<br>$ minikube addons enable ingress</p><p>$ minikube dashboard</p><p>$ minikube stop<br>$ minikube start</p><p>$ minikube delete</p><p>sudo apt-get install virtualbox-guest-additions-iso</p><p>Source:</p><ul><li><a href="https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository"></a></li><li><a href="https://www.linuxbuzz.com/install-minikube-on-ubuntu/">How to Install Minikube on Ubuntu 22.04 Step-by-Step</a></li><li><a href="https://help.ubuntu.com/community/VirtualBox/GuestAdditions">VirtualBox/GuestAdditions</a></li><li><a href="https://helm.sh/docs/intro/install/">Installing Helm | Helm</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=287b9952dd6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helm Basics]]></title>
            <link>https://medium.com/@hugokce/helm-basics-249c1bb273d9?source=rss-25f2b5954594------2</link>
            <guid isPermaLink="false">https://medium.com/p/249c1bb273d9</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[helm-chart]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Umut G]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 05:19:56 GMT</pubDate>
            <atom:updated>2024-02-29T05:19:56.449Z</atom:updated>
            <content:encoded><![CDATA[<p>Helm Basics</p><p><strong>Helm Basics</strong></p><p>Packaging manager: win installer, apt, yum, npm</p><p>Chart is packages in helm world.</p><p>helm install apache bitnami/apache — namespace=web</p><p>helm upgrade apache bitnami/apache — namespace=web</p><p>helm rollback apache 1 — namespace=web</p><p>helm uninstall apache</p><p>Values.yaml file we can pass parameters to this template. It will be used to generate final yaml file.</p><p>Packages are stored in a chart repository.</p><p>Helm is written Go language that it is compiled language.</p><p>sudo usermod -aG sudo username</p><p>sudo usermod -aG wheel username</p><p>tar -zxvf helm-v3.0.0-linux-amd64.tar.gz</p><p>mv linux-amd64/helm/usr/local/bin/helm</p><p>Choco install kubernetes-helm</p><p>helm — help</p><p>helm repo list</p><p>helm repo add bitnami <a href="https://charts.bitnami.com/bitnami">https://charts.bitnami.com/bitnami</a></p><p>helm repo list</p><p>helm repo remove bitnami</p><p>helm repo add bitnami <a href="https://charts.bitnami.com/bitnami">https://charts.bitnami.com/bitnami</a></p><p>Search the repository:</p><p>helm search repo apache</p><p>helm repo update</p><p>helm search repo mysql</p><p>helm search repor mysql — versions this will list all chart versions</p><p>helm search repo database</p><p>helm search repo database — versions</p><p>Install a package:</p><p>kubectl get pods command will run first terminal. if it did not start minikube start</p><p>(Below Two commands — In a Different Shell/Commandline window/tab)</p><p>minikube ssh</p><p>docker images</p><p>We run this command in minikube</p><p>helm install mydb bitnami/mysql</p><p>helm install my-release oci://registry-1.docker.io/bitnamicharts/mysql</p><p>helm install mysqldb oci://registry-1.docker.io/bitnamicharts/mysql</p><p>Kubectl get pods -w — namespace default</p><p>echo Password : $(kubectl get secret — namespace default mydb-mysql -o jsonpath=”{.data. mysql-root-password}” | base64 — decode)</p><p>To connect to your database:</p><p>1. Run a pod that you can use as a client:</p><p>kubectl run mydb-mysql-client — rm — tty -i — restart=’Never’ — image docker.io/bitnami/mysql:8.0.26-debian-10-r31 — namespace default</p><p>— command — bash</p><p>2. To connect to primary service (read/write):</p><p>mysql -h mydb-mysql.default.svc.cluster. local -uroot -p my_database</p><p>Show databases;</p><p>Check the cluster:</p><p>kubectl get pods</p><p>minikube ssh</p><p>docker images</p><p>To check the installation status:</p><p>helm status mydb</p><p>Kubectl create ns teamtwo</p><p>Helm install — namespace teamtwo mydbsql bitnami/mysql</p><p>List &amp; Unlist</p><p>Helm list</p><p>helm list — namespace teamtwo</p><p>helm uninstall mysqldb</p><p>kubectl get pods</p><p>helm uninstall mysqldb -n teamtwo</p><p>Helm install mysqldb bitnami/mysql — values /Users/bharaththippireddy/Documents/helm/values.yaml</p><p>Values.yaml file contains below codes</p><p>Auth:</p><p>rootPassword:””</p><p>kubectl run mydb-mysql-client — rm — tty -i — restart=’Never’ — image docker.io/bitnami/mysql:8.0.26-debian-10-r31 — namespace default — command — bash</p><p>mysql -h mydb-mysql.default.svc.cluster.local uroot -p my_database</p><p>After login</p><p>Show tables;</p><p>Create database test;</p><p>helm install mysqldb bitnami/mysql — set auth.rootPassword</p><p>— — — — — — — — — — — — — — — — — — — — — —</p><p>helm repo update</p><p>helm list</p><p>helm status mysqldb</p><p>helm install mysqldb bitnami/mysql — values /Users/bharaththippireddy/Documents/helm/values.yaml</p><p>helm upgrade mysqldb bitnami/mysql — reuse-values</p><p>To Upgrade:</p><p>ROOT_PASSWORD=$(kubectl get secret — namespace default mydb-mysql -o jsonpath=”{.data.mysql-root-password}” | base64 — decode)</p><p>helm upgrade — namespace default mysql-release bitnami/mysql — set auth.rootPassword=$ROOT_PASSWORD</p><p>— — — -</p><p>helm uninstall mysql-release</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Kubectl get secrets</p><p>After upgrade secret will have new version. After uninstall secrets will be deleted.</p><p>helm uninstall mysqldb — keep-history</p><p>Helm ls will show nothing</p><p>Kubectl get secrets will show default secret</p><p>OLD:</p><p>tomcatPassword: test</p><p>service:</p><p>type: NodePort</p><p>nodePort: 30007</p><p>NEW:</p><p>tomcatPassword: test</p><p>service:</p><p>type: NodePort</p><p>nodePorts:</p><p>http: 30007</p><p>Advanced Commands</p><p>helm install mysqldb bitnami/mysql — set auth.rootPassword=Password</p><p>helm — dry-run</p><p>it will not create any in the cluster</p><p>helm install mysqldb bitnami/mysql — values /Users/bharaththippireddy/Documents/helm/values.yaml — dry-run</p><p>Dry-run is using for debugging. Generates the output manifest and sends it to the Kubernetes API for verification.</p><p>From &lt;<a href="https://www.squadcast.com/blog/helm-dry-run">https://www.squadcast.com/blog/helm-dry-run</a>&gt;</p><p>Dry-run is a new feature that we intend to implement in the api-server. The goal is to be able to send requests to modifying endpoints, and see if the request would have succeeded (admission chain, validation, merge conflicts, …) and/or what would have happened without having it actually happen.</p><p>From &lt;<a href="https://www.google.com/search?q=helm+dry+run&amp;rlz=1C1GCEU_enTR1056TR1056&amp;oq=helm+dr&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyCQgBEEUYORiABDIHCAIQABiABDINCAMQLhivARjHARiABDIHCAQQABiABDIHCAUQABiABDIHCAYQABiABDIHCAcQABiABDIHCAgQABiABDIHCAkQABiABKgCALACAA&amp;sourceid=chrome&amp;ie=UTF-8">https://www.google.com/search?q=helm+dry+run&amp;rlz=1C1GCEU_enTR1056TR1056&amp;oq=helm+dr&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyCQgBEEUYORiABDIHCAIQABiABDINCAMQLhivARjHARiABDIHCAQQABiABDIHCAUQABiABDIHCAYQABiABDIHCAcQABiABDIHCAgQABiABDIHCAkQABiABKgCALACAA&amp;sourceid=chrome&amp;ie=UTF-8</a>&gt;</p><p>When we execute it will show many more rows of code kubernetes details.</p><p>There are 3 section. First is release information.</p><p>install never happens when we use dry-run</p><p>Second section is key section.</p><p>Third section is release notes. We can look at that everything is ok</p><p>Dry-run can be used installation and upgrade.</p><p>Helm template</p><p>helm template mysqldb bitnami/mysql — values /Users/bharaththippireddy/Documents/helm/values.yaml</p><p>It will again generate template we can see at command screen.</p><p>It never communicate kubernetes API server</p><p>Sources:</p><p><a href="https://htrdc.udemy.com/course/helm-kubernetes-packaging-manager-for-developers-and-devops/learn/lecture/28292194#overview">udemy course helm-kubernetes-packaging-manager-for-developers-and-devops/</a></p><p>helm.sh/docs</p><p>Bitnami.com/stacks/helm</p><p><a href="https://bitnami.com/stack/mysql/helm">https://bitnami.com/stack/mysql/helm</a></p><p><a href="https://github.com/bitnami/charts/tree/main/bitnami/mysql/#installing-the-chart">https://github.com/bitnami/charts/tree/main/bitnami/mysql/#installing-the-chart</a></p><p><a href="https://github.com/bitnami/charts/blob/main/bitnami/mysql/templates/NOTES.txt">https://github.com/bitnami/charts/blob/main/bitnami/mysql/templates/NOTES.txt</a></p><p><a href="https://www.linkedin.com/posts/mmumshad_kodekloud-devops-kubernetes-activity-7151550895804022784-xh0r">https://www.linkedin.com/posts/mmumshad_kodekloud-devops-kubernetes-activity-7151550895804022784-xh0r</a></p><p><a href="https://phoenixnap.com/kb/helm-commands-cheat-sheet">https://phoenixnap.com/kb/helm-commands-cheat-sheet</a></p><p><a href="https://cheat-sheets.nicwortel.nl/helm-cheat-sheet.pdf">https://cheat-sheets.nicwortel.nl/helm-cheat-sheet.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=249c1bb273d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerd Cheat Sheet]]></title>
            <link>https://medium.com/@hugokce/containerd-cheat-sheet-6a395b489c50?source=rss-25f2b5954594------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a395b489c50</guid>
            <category><![CDATA[containerd]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[containerization]]></category>
            <dc:creator><![CDATA[Umut G]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 05:16:07 GMT</pubDate>
            <atom:updated>2024-02-29T05:16:07.614Z</atom:updated>
            <content:encoded><![CDATA[<p>Containerd Cheat Sheet</p><p><strong>Build</strong></p><p># Build OCI images (default for podman)<br>$ podman build — format=oci</p><p># Build Docker images instead<br>$ podman build — format=docker</p><p># Similarly in ‘docker buildx’<br>$ docker buildx build — output type=oci<br>$ docker buildx build — output type=docker</p><p><strong>Runtime</strong></p><p>Container runtimes are software that facilitate the containers to run. According to the official GitHub repo “Containerd is an industry-standard container runtime with an emphasis on simplicity and robustness and portability.” “Containerd is one of the most extensible, well-architected and optimal runtimes focused on simplicity that is meant to be embedded into a larger ecosystem.” Containerd does not build images; it just consumes them. For a clearer picture, check out the scope of Containerd in the official Github repo.</p><p><strong>History</strong></p><p>The Containerd is born out of the monolithic Docker, and is included in Docker, from Docker 1.11. Kubernetes supports the use of Containerd as a runtime from Kubernetes 1.10 and above</p><p>High-level container runtime: containerd / CRI-O<br>Responsibilities:</p><p>-pull container images from registries</p><p>-manage images on disk</p><p>-launch a lower-level runtime to run container processes</p><p>containerd: born from parts of the original Docker project.<br>-has its own CLI (ctr) in addition to crictl.<br>-config: /etc/containerd</p><p>CRI-O:</p><p>-created by RedHat<br>-CRI-O stands for “Container Runtime Interface — OpenShift”.<br>-depend on other RedHat container tools: podman, buildah, skopeo.<br>-no separate CLI.</p><p>-config files:<br> /etc/containers<br> /etc/crio/crio.conf<br> /etc/containers/registries.conf<br>- images stored in /var/lib/containers</p><p>Low-level container runtime: runc, crun<br>-runc: the “reference implementation” of OCI. Written in Go. Both containerd and CRI-O use runc by default.<br>-runsc: gVisor from Google, which creates containers that have their own kernel. Also compliant with OCI spec.<br>-crun: written in C.</p><p>Most likely you do not need to use runc directly, but you can get more info about the running containers:</p><p>$ runc list</p><p>$ ls /run/runc</p><p>$ cat /run/runc/$NAME/state.json</p><p><strong>containerd</strong></p><p># containerd view logs<br>$ journalctl -u containerd</p><p>ctr vs crictl:</p><p>-ctr: containerd CLI, not related to k8s.<br>-crictl: CRI Compatible container runtime command line interface, related to k8s.</p><p>crictl image = ctr -n=k8s.io images ls</p><p>kind load uses “ctr”, “ — namespace=k8s.io”, “images”, “import”, “ — digests”, “ — snapshotter=”+snapshotter, “-”</p><p><strong>Registry</strong></p><p>Config: /etc/containerd/config.toml</p><p>version = 2</p><p>[plugins.”io.containerd.grpc.v1.cri”.registry]<br> config_path = “/etc/containerd/certs.d”</p><p>Per registry config:</p><p>$ tree /etc/containerd/certs.d<br>/etc/containerd/certs.d<br> docker.io<br> hosts.toml</p><p><strong>Versus</strong></p><p>buildah run vs podman run</p><p>-buildah run command emulates the RUN command in a Dockerfile<br>-podman run command emulates the docker run command in functionality.</p><p>podman vs docker<br>-Podman containers are rootless; docker supports both root and rootless mode.<br> Podman uses systemd to make updates and keep containers running in the background. By integrating systemd and Podman,</p><p>you can generate control units for your containers and run them with systemd automatically enabled.<br>-Docker is all-in-one; podman work with buildah, skopeo, etc.</p><p><strong>Basic Demo Commands:</strong></p><p>Pull image</p><p># ctr image pull docker.io/library/hello-world</p><p># ctr images pull — all-platforms docker.io/library/nginx:alpine</p><p># sudo ctr images pull docker.io/library/nginx:latest</p><p>List images</p><p># ctr image ls</p><p># ctr image ls -q</p><p># sudo ctr images list</p><p>Run container</p><p>#ctr container create docker.io/library/hello-world:latest demo</p><p>This would create a container with container id, ‘demo’, based on the image that we pulled.</p><p>#sudo ctr run — rm -t docker.io/library/nginx:latest my-nginx-container</p><p>— rm removes the container when it exits.</p><p>-t allocates a TTY for an interactive session.</p><p>Unlike Docker, we need to use the full path with the object every time we use a container image.</p><p>Also, the image needs to be pulled before being able to run a container.</p><p>Run a Container in the Background (Daemon):</p><p>#sudo ctr run — rm -d docker.io/library/nginx:latest my-nginx-container</p><p>-d runs the container as a detached, background process.</p><p>List the containers or tasks:</p><p># ctr container list</p><p>You can see the demo container listed. You can even use -q to get just the container names.</p><p># sudo ctr containers list</p><p># sudo ctr task list</p><p>Delete the image</p><p># ctr image remove docker.io/library/hello-world:latest</p><p># ctr container list</p><p>Your container would still be running. This is because containerd works on references, and in this case, the image is no longer being referenced as an image but it is still being referenced by the container (as a snapshot), so it wouldn’t be deleted as long as it’s being referenced.</p><p>Delete the container</p><p># ctr container remove demo</p><p>Execute a Command in a Running Container:</p><p># sudo ctr exec -t my-nginx-container sh</p><p>sh can be replaced with the desired command.</p><p>Stop a Container:</p><p># sudo ctr task kill my-nginx-container</p><p>Remove a Container:</p><p># sudo ctr task delete my-nginx-container</p><p>Inspect a Container or Task:</p><p># sudo ctr task inspect my-nginx-container</p><p>Logs of a Container:</p><p># sudo ctr task logs my-nginx-container</p><p>List Snapshots (Checkpoints):</p><p># sudo ctr snapshots list</p><p>Create a Snapshot:</p><p># sudo ctr snapshot create my-snapshot my-nginx-container</p><p>Delete a Snapshot:</p><p># sudo ctr snapshot delete my-snapshot</p><p>List Checkpoints:</p><p># sudo ctr checkpoints list</p><p>Create a Checkpoint:</p><p># sudo ctr checkpoint create my-checkpoint my-nginx-container</p><p>Delete a Checkpoint:</p><p># sudo ctr checkpoint delete my-checkpoint</p><p>List Active Tasks:</p><p># sudo ctr tasks ps</p><p>Prune Containers and Images:</p><p># sudo ctr containers prune and sudo ctr images prune</p><p><strong>What is the difference between crictl % ctr?</strong></p><p>crictl and ctr are both command-line tools for managing containers in Kubernetes. However, they have different purposes and use cases.</p><p><strong>crictl</strong> is a tool for managing containers through the Container Runtime Interface (CRI). CRI is a standard interface that allows Kubernetes to communicate with different container runtimes, such as containerd and Docker. crictl can be used to perform a variety of tasks, such as:</p><ul><li>Listing all containers</li><li>Inspecting a container</li><li>Running a container</li><li>Stopping a container</li><li>Removing a container</li><li>Pulling an image</li><li>Executing a command in a container</li></ul><p><strong>ctr</strong> is a tool for managing containers directly through the containerd runtime. ctr can be used to perform a variety of tasks, such as:</p><ul><li>Listing all images</li><li>Pulling an image</li><li>Running a container</li><li>Executing a command in a container</li><li>Removing an image</li></ul><p><strong>Which tool should you use?</strong></p><p>If managing containers in Kubernetes, may use crictl. crictl is the recommended tool for interacting with containerd through the CRI.</p><p>If developing or debugging containerd, or need to manage containers directly, may use ctr. ctr provides more features than crictl, such as the ability to list and remove images.</p><p># ctr images<br>NAME:<br> ctr images — manage images</p><p>USAGE:<br> ctr images command [command options] [arguments…]</p><p>COMMANDS:<br> check check existing images to ensure all content is available locally<br> export export images<br> import import images<br> list, ls list images known to containerd<br> mount mount an image to a target path<br> unmount unmount the image from the target<br> pull pull an image from a remote<br> push push an image to a remote<br> delete, del, remove, rm remove one or more images by reference<br> tag tag an image<br> label set and clear labels for an image<br> convert convert an image</p><p>Viewing Images<br># ctr images ls</p><p>Downloading an Image<br>Containerd supports OCI-standard images. Therefore, you can directly use Docker official images or Dockerfile images.</p><p># ctr images pull — all-platforms docker.io/library/nginx:alpine<br># ctr images pull docker.io/library/nginx:latest<br># uname -a</p><p>Image Mounting</p><p># ctr images mount docker.io/library/nginx:alpine /mnt<br>sha256:af2fcce448e2e4451a5f4796a9bf9cb5c9b5f88e0d6d10029cada42fb9d268ac<br>/mnt<br>[root@localhost ~]# ls /mnt</p><p># umount /mnt</p><p>Exporting Images<br># ctr i export — all-platforms nginx.img docker.io/library/nginx:alpine</p><p>Image Deletion<br># ctr image rm docker.io/library/nginx:alpine<br># ctr images ls</p><p>Importing Images<br># ctr images import nginx.img</p><p>Modifying an Image Tag</p><p># ctr images tag docker.io/library/nginx:alpine nginx:alpine<br># ctr images ls<br># ctr images check</p><p>Containerd container management<br>#ctr — help</p><p># ctr container — help<br>NAME:<br> ctr containers — manage containers</p><p>USAGE:<br> ctr containers command [command options] [arguments…]</p><p>COMMANDS:<br> create create container<br> delete, del, remove, rm delete one or more existing containers<br> info get info about a container<br> list, ls list containers<br> label set and clear labels for a container<br> checkpoint checkpoint a container<br> restore restore a container from checkpoint</p><p>Viewing Containers<br># ctr container ls<br># ctr c ls</p><p>Viewing Tasks<br># ctr task ls<br># ctr t ls</p><p>Creating a Static Container<br># ctr c create docker.io/library/nginx:alpine nginx1<br># ctr container ls</p><p>Entering the Container<br># ctr task exec — exec-id 1 nginx1 /bin/sh</p><p>Directly running a dynamic container<br># ctr run -d — net-host docker.io/library/nginx:alpine nginx2<br># ctr container ls<br># ctr tasks ls</p><p>Pausing Containers</p><p># ctr tasks pause nginx2<br># ctr tasks ls</p><p>Restoring a Container<br># ctr tasks resume nginx2<br># ctr tasks ls</p><p>Stop Container<br># ctr tasks — help<br># ctr tasks kill nginx2<br># ctr tasks ls</p><p>Deleting a Container<br># ctr tasks delete nginx2<br># ctr container ls<br># ctr container delete nginx2</p><p>ctr download image<br># ctr images pull — platform linux/amd64 docker.io/library/nginx:latest</p><p>Uploading an Image to the CTR<br># ctr images tag docker.io/library/nginx:latest harbor.kubemsb.com/library/nginx:latest<br># ctr images push — platform linux/amd64 — plain-http -u admin:密码 harbor.kubemsb.com/library/nginx:latest</p><p>Source:</p><p><a href="https://github.com/containerd/containerd/blob/main/docs/getting-started.md">https://github.com/containerd/containerd/blob/main/docs/getting-started.md</a></p><p><a href="https://www.hackingnote.com/en/cheatsheets/containers/">https://www.hackingnote.com/en/cheatsheets/containers/</a></p><p><a href="https://github.com/containers">https://github.com/containers</a></p><p><a href="https://sweetcode.io/getting-started-with-containerd/">https://sweetcode.io/getting-started-with-containerd/</a></p><p><a href="https://sweetcode.io/tag/cloud-native-computing-foundation/">https://sweetcode.io/tag/cloud-native-computing-foundation/</a></p><p><a href="https://cloud.tencent.com/developer/article/2308391">https://cloud.tencent.com/developer/article/2308391</a></p><p><a href="https://containerd.io/">https://containerd.io</a></p><p><a href="https://opencontainers.github.io/org/introduction">https://opencontainers.github.io/org/introduction</a></p><p><a href="https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction/">https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction/</a></p><p><a href="https://github.com/containerd/containerd">https://github.com/containerd/containerd</a></p><p><a href="https://www.scribd.com/document/688368691/containerd-commands">https://www.scribd.com/document/688368691/containerd-commands</a></p><p><a href="https://www.mankier.com/8/ctr">https://www.mankier.com/8/ctr</a></p><p><a href="https://www.devopsschool.com/blog/what-is-difference-between-crictl-and-ctr/#:~:text=Which%20tool%20should%20you%20use,directly%2C%20you%20can%20use%20ctr">https://www.devopsschool.com/blog/what-is-difference-between-crictl-and-ctr/#:~:text=Which%20tool%20should%20you%20use,directly%2C%20you%20can%20use%20ctr.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a395b489c50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Curl CheatSheet]]></title>
            <link>https://medium.com/@hugokce/curl-cheatsheet-8827f4c182ab?source=rss-25f2b5954594------2</link>
            <guid isPermaLink="false">https://medium.com/p/8827f4c182ab</guid>
            <category><![CDATA[curl]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Umut G]]></dc:creator>
            <pubDate>Thu, 29 Feb 2024 05:09:08 GMT</pubDate>
            <atom:updated>2024-02-29T05:09:08.201Z</atom:updated>
            <content:encoded><![CDATA[<p>Options</p><p>-o &lt;file&gt; # — output: write to file<br>-u user:pass # — user: Authentication<br>-v # — verbose<br>-vv # Even more verbose<br>-s # — silent: don’t show progress meter or errors<br>-S # — show-error: when used with — silent (-sS), show errors but no progress meter</p><p>-i # — include: Include the HTTP-header in the output<br>-I # — head: headers only</p><p>SSL</p><p>— cacert &lt;file&gt;<br> — capath &lt;dir&gt;<br>-E, — cert &lt;cert&gt; # — cert: Client cert file<br> — cert-type # der/pem/eng<br>-k, — insecure # for self-signed certs</p><p>Request</p><p>-X POST # — request<br>-L # follow link if page redirects<br>-F # — form: HTTP POST data for multipart/form-data</p><p>Data</p><p>-d ‘data’ # — data: HTTP post data, URL encoded (eg, status=”Hello”)<br>-d @file # — data via file<br>-G # — get: send -d data via get</p><p>Header</p><p>-A &lt;str&gt; # — user-agent<br>-b name=val # — cookie<br>-b FILE # — cookie<br>-H “X-Foo: y” # — header<br> — compressed # use deflate/gzip</p><p># Post data:<br>curl -d password=x <a href="http://x.com/y">http://x.com/y</a><br># Auth/data:<br>curl -u user:pass -d status=”Hello” <a href="http://abc.com/statuses/update.xml">http://abc.com/statuses/update.xml</a><br># multipart file upload<br>curl -v — include — form key1=value1 — form upload=@localfilename URL</p><p># multipart form: send data from text field and upload file<br>curl -F person=anonymous -F secret=@file.txt <a href="http://abc.com/submit.cgi">http://abc.com/submit.cgi</a><br># Use Curl to Check if a remote resource is available<br># details: <a href="https://matthewsetter.com/check-if-file-is-available-with-curl/">https://matthewsetter.com/check-if-file-is-available-with-curl/</a><br>curl -o /dev/null — silent -Iw “%{http_code}” <a href="https://example.com/my.remote.tarball.gz">https://example.com/my.remote.tarball.gz</a></p><p>Resource</p><p><a href="https://devhints.io/curl">https://devhints.io/curl</a></p><p><a href="https://everything.curl.dev/usingcurl">https://everything.curl.dev/usingcurl</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8827f4c182ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K9s Kubernetes CLI to Manage]]></title>
            <link>https://medium.com/@hugokce/k9s-kubernetes-cli-to-manage-ba1a83cacb5d?source=rss-25f2b5954594------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba1a83cacb5d</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Umut G]]></dc:creator>
            <pubDate>Wed, 28 Feb 2024 12:31:12 GMT</pubDate>
            <atom:updated>2024-02-28T13:01:10.295Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Kubernetes CLI To Manage</em></p><p><strong>K9s</strong></p><p>K9s is a terminal based UI to interact with Kubernetes clusters. This product is to make easier to navigate, observe and manage deployed applications. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with observed resources.</p><ol><li>Get info about K9s runtime (logs, configs, locations for config, screen dumps, etc..)<br>k9s info</li></ol><p>2. Run K9s in a given namespace.<br>k9s -n mycoolns</p><p>3. Run K9s and launch in pod view via the pod command.<br>k9s -c pod</p><p>4. Start K9s in a non default KubeConfig context<br>k9s -- context coolCtx</p><p>5. Start K9s in readonly mode — with all modification commands disabled<br>k9s -- readonly</p><p>6. Use default kubeconfig<br>$ k9s</p><p>7. Use non-default kubeconfig<br>$ k9s — kubeconfig /path/to/kubeconfig</p><p>Check more from outside of k9s:</p><p>$ kubectl top nodes<br>$ kubectl top pods</p><p><strong>Metrics Server</strong></p><p>Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes pipelines.</p><p>Metrics Server collects resource metrics from Kubelets and exposes them in Kubernetes apiserver through <a href="https://github.com/kubernetes/metrics">Metrics API</a> for use by <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/">Horizontal Pod Autoscaler</a> and <a href="https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/">Vertical Pod Autoscaler</a>. Metrics API can also be accessed by kubectl top</p><p>In such cases metrics are able to collect from Kubelet /metrics/resource endpoint directly.</p><p>Metrics Server offers:</p><ul><li>A single deployment that works on most clusters For details please go to <a href="https://github.com/kubernetes-sigs/metrics-server#requirements">Requirements</a> page.</li><li>Fast autoscaling, collecting metrics every 15 seconds.</li><li>Resource efficiency, using 1 mili core of CPU and 2 MB of memory for each node in a cluster.</li><li>Scalable support up to 5,000 node clusters.</li></ul><p>This article is going to improve.</p><p>Thanks for reading.</p><p>Source:</p><ul><li><a href="https://k9scli.io/">K9s - Manage Your Kubernetes Clusters In Style</a></li><li><a href="https://k9scli.io/topics/commands/">Commands</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FX3444KfjguE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DX3444KfjguE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FX3444KfjguE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a654f2e06479b61d84f63893a8c85c0/href">https://medium.com/media/6a654f2e06479b61d84f63893a8c85c0/href</a></iframe><ul><li><a href="https://www.hackingnote.com/en/cheatsheets/k9s/">k9s Cheatsheet</a></li><li><a href="https://octopus.com/blog/kubernetes-pod-cpu-memory">Checking Kubernetes pod CPU and memory - Octopus Deploy</a></li><li><a href="https://github.com/kubernetes-sigs/metrics-server">GitHub - kubernetes-sigs/metrics-server: Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.</a></li><li><a href="https://github.com/kubernetes-sigs/metrics-server#requirements">GitHub - kubernetes-sigs/metrics-server: Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba1a83cacb5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>