<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Oshi Gupta</title>
    <description>The latest articles on DEV Community by Oshi Gupta (@oshi36).</description>
    <link>https://dev.to/oshi36</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F337481%2Fb0ac766f-b364-455b-8b22-7ec22880e9aa.jpg</url>
      <title>DEV Community: Oshi Gupta</title>
      <link>https://dev.to/oshi36</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oshi36"/>
    <language>en</language>
    <item>
      <title>Creating Kubernetes Cluster With CRI-O</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Sun, 30 Jul 2023 13:09:58 +0000</pubDate>
      <link>https://dev.to/oshi36/creating-kubernetes-cluster-with-cri-o-i6j</link>
      <guid>https://dev.to/oshi36/creating-kubernetes-cluster-with-cri-o-i6j</guid>
      <description>&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/architecture/cri/" rel="noopener noreferrer"&gt;Container Runtime Interface (CRI)&lt;/a&gt; is one of the important parts of the Kubernetes cluster. It is a plugin interface allowing Kubelet to use different container runtimes. And recently &lt;a href="https://cri-o.io/" rel="noopener noreferrer"&gt;CRI-O&lt;/a&gt; container runtime has been announced as a &lt;a href="https://www.cncf.io/projects/cri-o/" rel="noopener noreferrer"&gt;CNCF Graduated project&lt;/a&gt;. I thought of writing a blog on CRI-O and how to set up a single-node Kubernetes cluster with Kubeadm and CRI-O.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CRI-O?
&lt;/h2&gt;

&lt;p&gt;CRI-O is a &lt;strong&gt;lightweight container runtime&lt;/strong&gt; for Kubernetes. It is an implementation of Kubernetes CRI to use &lt;a href="https://opencontainers.org/" rel="noopener noreferrer"&gt;Open Container Initiative (OCI)&lt;/a&gt; compatible runtimes for running pods. It supports &lt;strong&gt;runc&lt;/strong&gt; and &lt;strong&gt;Kata Containers&lt;/strong&gt; as the container runtimes, but any OCI-compatible runtime can be integrated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is an open-source, community-driven project which supports OCI-based container registries.&lt;/strong&gt;&lt;br&gt;
It is being maintained by contributors working in Red Hat, Intel, etc. It also comes with a monitoring program known as &lt;a href="https://github.com/containers/conmon" rel="noopener noreferrer"&gt;conmon&lt;/a&gt;. Conmon is an OCI container runtime monitor, which makes the communication between CRI-O and runc for a single container.&lt;/p&gt;

&lt;p&gt;The below figure shows how CRI-O works with the Kubernetes cluster for creating containers in the pod.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jugcdg3u0dvkg328c42.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jugcdg3u0dvkg328c42.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Read more about the architecture of CRI-O &lt;a href="https://cri-o.io/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The networking of the pod is set up through &lt;a href="https://github.com/containernetworking/cni" rel="noopener noreferrer"&gt;CNI&lt;/a&gt;, and CRI-O can be used with any CNI plugin.&lt;/p&gt;

&lt;p&gt;Now, let’s see how to set up a Kubernetes cluster with &lt;a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/" rel="noopener noreferrer"&gt;Kubeadm &lt;/a&gt;and &lt;a href="https://github.com/cri-o/cri-o/blob/main/install.md" rel="noopener noreferrer"&gt;CRI-O&lt;/a&gt; as the container runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kubernetes Cluster With Kubeadm and CRI-O
&lt;/h2&gt;

&lt;p&gt;In this, we will see how to set up a single-node Kubernetes cluster with Kubeadm and CRI-O as the container runtime. For this, I have used an &lt;strong&gt;Ubuntu 22.04&lt;/strong&gt; VM with 2 CPUs and 2 GB memory (minimum requirement for Kubeadm). In the last, I have attached a video showing the installation process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install Kubeadm, Kubelet, and Kubectl
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First, disable the swap to make kubelet work properly.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
swapoff -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel="noopener noreferrer"&gt;Install Kubeadm , Kubelet, and Kubectl CLI tools&lt;/a&gt;. For this, update the apt package index and install packages to use Kubernetes apt repository.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-get update
apt-get install -y apt-transport-https ca-certificates curl

curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To install a Kubernetes cluster of a specific version, specify the version like below.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-get update
apt-get install -y kubelet=1.26.3-00 kubeadm=1.26.3-00 kubectl=1.26.3-00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Here I will be setting up a Kubernetes cluster with version 1.26.3&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check the version of the CLI tools.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubeadm version
kubectl version
kubelet --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt1kctumu19o8oytqcjd.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt1kctumu19o8oytqcjd.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put a hold on these three tools so that it will not get an update if we update the system.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-mark hold kubelet kubeadm kubectl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install CRI-O
&lt;/h3&gt;

&lt;p&gt;Complete the prerequisites of installing any container runtime.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable &lt;strong&gt;br_netfilter&lt;/strong&gt; and &lt;strong&gt;overlay&lt;/strong&gt; modules and make iptables see bridged traffic.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat &amp;lt;&amp;lt;EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF

sudo modprobe overlay
sudo modprobe br_netfilter

# sysctl params required by setup, params persist across reboots
cat &amp;lt;&amp;lt;EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables  = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward                 = 1
EOF

# Apply sysctl params without reboot
sudo sysctl --system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify the modules are loaded with the following commands.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lsmod | grep br_netfilter
lsmod | grep overlay
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Check the below-mentioned variables are set to 1 for letting iptables seeing bridged traffic.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install CRI-O by setting &lt;strong&gt;OS&lt;/strong&gt; and &lt;strong&gt;VERSION&lt;/strong&gt; variables. Set OS according to your system and VERSION according to the Kubernetes cluster you wish to set up. It should be the same as Kubeadm/Kubelet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OS=xUbuntu_22.04
VERSION=1.26
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb [signed-by=/usr/share/keyrings/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" &amp;gt; /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list

echo "deb [signed-by=/usr/share/keyrings/libcontainers-crio-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" &amp;gt; /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list

mkdir -p /usr/share/keyrings

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-archive-keyring.gpg

curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-crio-archive-keyring.gpg

apt-get update

apt-get install cri-o cri-o-runc cri-tools -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start and enable the CRI-O service and check its status.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl start crio.service

sudo systemctl enable crio.service

sudo systemctl status crio.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vkqofi6dn545vn9pu0f.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vkqofi6dn545vn9pu0f.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One can also see the runtime info with the following.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;crictl info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Set Cluster With Kubeadm
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Pull the images for kubernetes version 1.26.3
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubeadm config images pull --kubernetes-version v1.26.3
kubeadm config images list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create the cluster control-plane node.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubeadm init --kubernetes-version v1.26.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hdlvln02ads3tujwi24.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6hdlvln02ads3tujwi24.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the config file in the &lt;strong&gt;~/.kube&lt;/strong&gt; directory to access the kuberentes cluster.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Remove the taint from the control-plane node.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl taint nodes --all node-role.kubernetes.io/control-plane-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Check the cluster nodes and verify the container runtime is CRI-O.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes -o wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7a06m7arsioj92ixnxz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7a06m7arsioj92ixnxz.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
As we have completed the process of creating a single node cluster. Now let’s install &lt;strong&gt;CNI&lt;/strong&gt; to create a pod and expose it via service. Also, verify that the pod is running with CRI-O container runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install CNI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I have used &lt;a href="https://cilium.io/" rel="noopener noreferrer"&gt;Cilium&lt;/a&gt; as CNI and installing it with &lt;a href="https://helm.sh/" rel="noopener noreferrer"&gt;helm&lt;/a&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3

chmod 700 get_helm.sh

./get_helm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm repo add cilium https://helm.cilium.io/

helm install cilium cilium/cilium --version 1.13.4 --namespace kube-system

kubectl get pods -n kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndh7f8jzt7xs3eqt3ydn.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndh7f8jzt7xs3eqt3ydn.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait till the Cilium pods get into &lt;strong&gt;Running&lt;/strong&gt; state.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Create a pod with &lt;strong&gt;nginx&lt;/strong&gt; as its image.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl run nginx --image=nginx
kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify CRI-O as container runtime is used in pod creation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl describe pod nginx | grep -i container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3jqjcp7r0bs325v1tt4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3jqjcp7r0bs325v1tt4.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expose the pod with the &lt;strong&gt;NodePort&lt;/strong&gt; service.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl expose pod nginx --type=NodePort --port=80
kubectl get svc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Access the application.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; curl http://&amp;lt;NODE_IP&amp;gt;:NODE_PORT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjawnshn3kppv6fxuc5i.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwjawnshn3kppv6fxuc5i.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6e6pbcvwvf4890tv77vk.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6e6pbcvwvf4890tv77vk.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yay!! A single-node Kubernetes cluster of version 1.26.3 is ready with CRI-O as the container runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/CWMHYFIzkZlvxFjDv4wcmBR1d" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fasciinema.org%2Fa%2FCWMHYFIzkZlvxFjDv4wcmBR1d.svg" alt="asciicast"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try out Hands-on
&lt;/h2&gt;

&lt;p&gt;You can try the hands-on lab for this blog &lt;a href="https://cloudyuga.guru/hands_on_lab/k8s-cri-o" rel="noopener noreferrer"&gt;here &lt;/a&gt;at CloudYuga.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cri-o.io/" rel="noopener noreferrer"&gt;CRI-O docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/" rel="noopener noreferrer"&gt;Container Runtimes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel="noopener noreferrer"&gt;Kubeadm From Kubernetes docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cri-o/cri-o/blob/main/install.md" rel="noopener noreferrer"&gt;CRI-O Installation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connect With Me!!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Twitter : &lt;a href="https://twitter.com/oshi1136" rel="noopener noreferrer"&gt;oshi1136&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;LinkedIn  : &lt;a href="https://www.linkedin.com/in/oshi-gupta-512716178/" rel="noopener noreferrer"&gt;Oshi Gupta&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Pod Disruption Budget in Kubernetes</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Mon, 03 Jul 2023 14:32:49 +0000</pubDate>
      <link>https://dev.to/oshi36/pod-disruption-budget-in-kubernetes-6kg</link>
      <guid>https://dev.to/oshi36/pod-disruption-budget-in-kubernetes-6kg</guid>
      <description>&lt;p&gt;Maintaining highly available applications in a Kubernetes cluster can be hard, especially when nodes go under maintenance or fail. The application pods get terminated or may reschedule on other nodes, which can cause downtime or data loss. &lt;/p&gt;

&lt;p&gt;To make the applications available &lt;strong&gt;24*7&lt;/strong&gt; even during system disruptions, a feature was introduced in Kubernetes known as &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets" rel="noopener noreferrer"&gt;Pod Disruption Budget&lt;/a&gt;. But before that, let’s dive into the different disruptions a system can face.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are Disruptions?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/" rel="noopener noreferrer"&gt;Disruption&lt;/a&gt;, in general, means to break a process, and in terms of Kubernetes, pod disruption means to terminate the pod running on a cluster node if a node fails/upgrades or someone destroys it. &lt;/p&gt;

&lt;p&gt;There are two types of disruptions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Involuntary Disruptions&lt;/li&gt;
&lt;li&gt;Voluntary Disruptions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Involuntary Disruptions
&lt;/h2&gt;

&lt;p&gt;These disruptions are unavoidable and occur mainly due to hardware or software errors. Some of its examples are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hardware failure of the node.&lt;/li&gt;
&lt;li&gt;The cluster admin deletes the node accidentally.&lt;/li&gt;
&lt;li&gt;Kernel-related problem.&lt;/li&gt;
&lt;li&gt;Cloud provider or hypervisor-related failure makes VM disappear.&lt;/li&gt;
&lt;li&gt;Node gets disappear due to cluster network partitions.&lt;/li&gt;
&lt;li&gt;Not enough resources left on a node.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Voluntary Disruptions
&lt;/h2&gt;

&lt;p&gt;These disruptions occur by the application owner or cluster administrator.&lt;/p&gt;

&lt;p&gt;An application owner can do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deletes the deployment/controller managing the pods.&lt;/li&gt;
&lt;li&gt;Updating the deployment pod’s template causes a restart.&lt;/li&gt;
&lt;li&gt;Accidentally deleting a pod.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A cluster administrator can do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/" rel="noopener noreferrer"&gt;Draining a node&lt;/a&gt; for upgrade and maintenance.&lt;/li&gt;
&lt;li&gt;Drain the node to scale down the cluster.&lt;/li&gt;
&lt;li&gt;Removing pod from node to schedule some other pod on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are some of the disruptions which take applications down and give users downtime. But let’s see how to deal with these disruptions.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Deal with Disruptions?
&lt;/h1&gt;

&lt;p&gt;To deal with involuntary disruptions, one can follow the below solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure your pod &lt;a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="noopener noreferrer"&gt;requests the resources&lt;/a&gt; it needs and not more.&lt;/li&gt;
&lt;li&gt;Create enough replicas of your application to make it more available(HA).&lt;/li&gt;
&lt;li&gt;Even in HA, use &lt;a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity" rel="noopener noreferrer"&gt;anti-affinity&lt;/a&gt; to have pods on all cluster nodes or zone if using multi-zone clusters.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Similarly, to deal with voluntary disruptions mainly caused by cluster admin actions such as draining a node for maintenance and scaling down a cluster. One can use &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets" rel="noopener noreferrer"&gt;Pod Disruption Budget (PDB)&lt;/a&gt; to make applications always available.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pod Disruption Budget
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets" rel="noopener noreferrer"&gt;Pod Disruption Budget (PDB) &lt;/a&gt;is an object created by the application owner that defines the minimum number of application replicas that should run during voluntary disruptions (node upgrade/maintenance) to make it highly available.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s understand with an example, Let’s say you are running a deployment with 6 replicas and have created a PDB which should have 4 replicas to run always in case of voluntary disruptions. Then the eviction API will allow the disruption of two pods at a time. &lt;/p&gt;

&lt;h2&gt;
  
  
  Features of  Pod Disruption Budget
&lt;/h2&gt;

&lt;p&gt;Below are the following features of PDB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The application owner creates the PDBs.&lt;/li&gt;
&lt;li&gt;It helps the operations team to manage the cluster while the application is always available.&lt;/li&gt;
&lt;li&gt;Provides an interface between cluster admin and application owner to work smoothly.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#create-eviction-pod-v1-core" rel="noopener noreferrer"&gt;Eviction API&lt;/a&gt; respects it.&lt;/li&gt;
&lt;li&gt;It defines the availability requirements.&lt;/li&gt;
&lt;li&gt;It works on Deployment, ReplicaSet, ReplicationController, and StatefulSet objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pod Disruption Budget Fields
&lt;/h2&gt;

&lt;p&gt;There are three main fields in PDB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.spec.selector&lt;/code&gt; in PDB denotes the set of pods on which it is applied. It is the same as the application controller's label selectors. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.spec.minAvailable&lt;/code&gt; denotes the number of pods that must be available after eviction. It can be an absolute number or percentage.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.spec.maxUnavailable&lt;/code&gt; denotes the number of pods that can be unavailable after eviction. It can be an absolute number or percentage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;One can only specify the minAvailable or maxUnavailable field in a single pod disruption budget, not both.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s see in more detail about PDB by creating a deployment and PDB on a multi-node cluster and draining one node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of Pod Disruption Budget
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can deploy a local multi-node cluster with Kind or use managed Kubernetes services. I have used the EKS cluster for this demo.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp05cdmo5xdte0sf0mfz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp05cdmo5xdte0sf0mfz.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDB is a &lt;strong&gt;namespaced-scope&lt;/strong&gt; resource and belongs to api group &lt;strong&gt;policy&lt;/strong&gt; with the &lt;strong&gt;v1&lt;/strong&gt; version.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl api-resources | grep pdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7zm1lremp6eoyigzsbj.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7zm1lremp6eoyigzsbj.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Below is the nginx-deployment yaml configuration with 8 replicas and &lt;strong&gt;app:nginx&lt;/strong&gt; as label selector.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# nginx-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deploy
  labels:
    app: nginx
spec:
  replicas: 8
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
        ports:
        - containerPort: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f nginx-deploy.yaml
kubectl get deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxnkhcbxeayvbgyfsgh6.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxnkhcbxeayvbgyfsgh6.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify pods are scheduled on both nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu0w8zdfdn3cz1zdg4fn5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu0w8zdfdn3cz1zdg4fn5.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Case: 1
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a PDB for the above deployment with the &lt;strong&gt;minAvailable field set to 5&lt;/strong&gt; and &lt;strong&gt;app:nginx as the label selector&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# pdb1.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: pdb-minavail
spec:
  minAvailable: 5
  selector:
    matchLabels:
      app: nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f pdb1.yaml
kubectl get pdb
kubectl describe pdb pdb-minavail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdow1hokp3fxcoj89kwwg.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdow1hokp3fxcoj89kwwg.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
As we have set &lt;strong&gt;minAvailable=5&lt;/strong&gt;, which means out of 8 replicas, 5 replicas will always run even if any voluntary disruption occurs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, let’s drain the node and see pdb working
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl drain &amp;lt;node_name&amp;gt; --ignore-daemonsets --delete-emptydir-data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It tries to evict the pod and retries until all get evicted. Also, my node is now &lt;strong&gt;SchedulingDisabled&lt;/strong&gt;. All the pods running on it are drained.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8phjkdwpo1v265ytpn4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn8phjkdwpo1v265ytpn4.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f4267uv7w7el21k9lp3.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f4267uv7w7el21k9lp3.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let’s check the pod status and verify whether they have been rescheduled.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -o wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhc7z5rav3nf0z8va3xl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhc7z5rav3nf0z8va3xl7.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Here 4 pods were running on each node, and when I drained the node, pods got evicted and started rescheduling. One of the pods got rescheduled on other node, and three were not as insufficient resources left on the node and get into pending state.&lt;/p&gt;

&lt;p&gt;But my node draining gets completed successfully as the PDB requirement was fulfilled to run 5 application pods. The eviction API respected PDB in this voluntary disruption.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now uncordon the node to make the rest of the pods schedulable. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu0b8ezc7955odlw3vfo2.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu0b8ezc7955odlw3vfo2.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Case: 2
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Now, increase the existing pdb &lt;strong&gt;minAvailable field to 6&lt;/strong&gt; and drain the node to see what happens.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# pdb1.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: pdb-minavail
spec:
  minAvailable: 6
  selector:
    matchLabels:
      app: nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f pdb1.yaml
kubectl get pdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgb3q420c599pmx2tykwz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgb3q420c599pmx2tykwz.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once again, drain the cluster node.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;k drain &amp;lt;node_name&amp;gt; --ignore-daemonsets  --delete-emptydir-data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdqjnxsp9lhe2vh55y2dv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdqjnxsp9lhe2vh55y2dv.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
You will observe that the drain will not be completed, and eviction API will retry to evict pods until it can reschedule on another node and throws an &lt;strong&gt;error: cannot evict pod as it would violate the pod’s disruption budget.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But why has this happened? &lt;strong&gt;Because the minimum available pods in pdb are 6 and the other node can only schedule 5 pods according to its resource capacity.&lt;/strong&gt; As mentioned, eviction API gives PDB priority, so to make a minimum of 6 pods available, it will not drain the node and run the pods on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fti51t8tinngqh3q3og5l.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fti51t8tinngqh3q3og5l.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although my node will mark SchedulingDisabled, it's not drained.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4ntfxn3lrwy07bpzr5j.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4ntfxn3lrwy07bpzr5j.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Delete the pdb and uncordon the node.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl delete pdb pdb-minavail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use Case : 3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Now, create another pdb resource with &lt;strong&gt;maxUnavailable set to 3&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# pdb2.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: pdb-maxunavail
spec:
  maxUnavailable: 3
  selector:
    matchLabels:
      app: nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f pdb2.yaml
kubectl describe pdb pdb-maxunavail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx6v9kv0142bbarj7vp4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx6v9kv0142bbarj7vp4.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow the same steps of draining a node to check pdb working
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;k drain &amp;lt;node_name&amp;gt;  --ignore-daemonsets  --delete-emptydir-data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenmfeuxw1g0frd8o92kv.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenmfeuxw1g0frd8o92kv.JPG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
This time draining works completely as the pdb requirement got satisfied.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The rest of the pods remain unschedulable.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e4qcq8odzzodvftvcff.JPG" alt="Image description"&gt;
Uncordon the node now.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Use Case: 4
&lt;/h3&gt;

&lt;p&gt;Reduce the &lt;strong&gt;maxUnavailable field to 2&lt;/strong&gt;, which makes 6 pods run all the time. Now if you drain the node, &lt;strong&gt;use case 2&lt;/strong&gt; scenario will happen. Node draining will be incomplete, and pods will not be evicted completely by giving weightage to PDB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Case: 5
&lt;/h3&gt;

&lt;p&gt;Now, what if I set &lt;strong&gt;maxUnavailable to 0?&lt;/strong&gt; This is equal to the setting of &lt;strong&gt;minAvailable to 100%&lt;/strong&gt;. It will be ensured that none of your pods will be disrupted when voluntary disruptions occur.&lt;/p&gt;

&lt;h1&gt;
  
  
  When not to use PDB?
&lt;/h1&gt;

&lt;p&gt;There are certain cases when pdb cannot be used, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn’t work for involuntary disruptions&lt;/li&gt;
&lt;li&gt;In voluntary disruptions, it will not work when pods or deployments get deleted.&lt;/li&gt;
&lt;li&gt;Two PDBs can not work together on the same resource.&lt;/li&gt;
&lt;li&gt;PDBs don’t work on a single pod or replica of deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;PDBs are useful when we want applications always available, even at cluster maintenance and upgrade times.&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/disruptions/" rel="noopener noreferrer"&gt;What is Disruption?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/" rel="noopener noreferrer"&gt;PDB in Pods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=0AGZ5no6-yo" rel="noopener noreferrer"&gt;Kubecon lightning talk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>pods</category>
    </item>
    <item>
      <title>My LFX Mentorship With Kyverno</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Mon, 20 Jun 2022 08:03:36 +0000</pubDate>
      <link>https://dev.to/oshi36/my-lfx-mentorship-with-kyverno-35jo</link>
      <guid>https://dev.to/oshi36/my-lfx-mentorship-with-kyverno-35jo</guid>
      <description>&lt;p&gt;&lt;em&gt;“In open-source, we feel strongly that to really do something well, you have to get a lot of people involved.”&lt;/em&gt; - Linus Torvalds&lt;/p&gt;

&lt;p&gt;This is one of my favourite quotes from Linus Torvalds which motivates me to contribute to open-source. &lt;br&gt;
Hello everyone, My name is Oshi Gupta, I have recently graduated from the &lt;a href="https://lfx.linuxfoundation.org/tools/mentorship/"&gt;Linux Foundation(LFX) mentorship program&lt;/a&gt; with &lt;a href="https://kyverno.io/"&gt;Kyverno &lt;/a&gt;and will be going to complete my engineering in the next two months.&lt;/p&gt;

&lt;p&gt;And in this blog, I will be sharing my experiences of contributing to Kyverno as how I started, my LFX application process, and my mentorship journey.&lt;/p&gt;
&lt;h3&gt;
  
  
  📝 Table Of Contents
&lt;/h3&gt;

&lt;p&gt;As this blog is covering my whole journey ,so to help you navigate it through easily this can help you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;About LFX Mentorship&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;About Kyverno&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How did I start with Kyverno?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applying For LFX Mentorship&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;My 12 Weeks Mentorship Journey&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Graduation From LFX Mentorship&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My Pull Requests&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the End&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  About LFX Mentorship
&lt;/h2&gt;

&lt;p&gt;The LFX mentorship is a &lt;strong&gt;remote learning opportunity&lt;/strong&gt; for the open-source contributors who will be working for &lt;strong&gt;12 weeks&lt;/strong&gt; under the guidance of mentors who are maintainers and developers of the particular project and they help the mentees to contribute to the community and project.&lt;br&gt;
&lt;em&gt;This mentorship program is organized thrice a year i.e. Spring, Summer, and Fall months.&lt;/em&gt; &lt;br&gt;
There are many organizations like &lt;a href="https://github.com/cncf/mentoring"&gt;CNCF&lt;/a&gt;, &lt;a href="https://wiki.hyperledger.org/display/INTERN"&gt;Hyperledger&lt;/a&gt;, and so on which provide mentorships in different projects of it under the umbrella of LFX.&lt;/p&gt;
&lt;h2&gt;
  
  
  About Kyverno
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://kyverno.io/"&gt;Kyverno &lt;/a&gt;is a &lt;strong&gt;policy engine specially designed for Kubernetes&lt;/strong&gt;. Kyverno helps to manage policies as Kubernetes resources and is written in &lt;strong&gt;YAML format&lt;/strong&gt;. Not only this, but It also helps in validating, mutating, and generating resources and as well as helping in verifying container images which are very important for software supply chain security.&lt;/p&gt;
&lt;h2&gt;
  
  
  How did I start with Kyverno?
&lt;/h2&gt;

&lt;p&gt;This all started a few months back with my internship as a technical writer at &lt;a href="https://cloudyuga.guru/"&gt;CloudYuga Technologies&lt;/a&gt; where I was exploring admission webhook in Kubernetes, and different policy engines such as &lt;em&gt;Open Policy Agent(OPA) and Kyverno&lt;/em&gt; for preparing a hands-on lab on them. And while going through both policy engines, Kyverno fascinates me a lot and I decided to learn more about it by contributing to it. &lt;/p&gt;

&lt;p&gt;First, I decided to take a &lt;a href="https://learn.nirmata.com/explore"&gt;Kyverno certification issued by Nirmata&lt;/a&gt; to get more understanding of it. Then, I started attending the &lt;strong&gt;Kyverno contributors meeting&lt;/strong&gt;, and honestly, as a beginner, I was not able to understand much in the first few meetings as it takes time to know about such a vast project.&lt;/p&gt;

&lt;p&gt;But I keep attending it, went through the documentation of the project for better understanding, kept asking questions on the communication channels, and learnt how to set up the project locally. And soon I made a &lt;a href="https://github.com/kyverno/website/pull/461"&gt;Pull Request&lt;/a&gt; to fix a minor documentation issue. Along with this I also got a chance to take a &lt;a href="https://community.cncf.io/events/details/cncf-chennai-presents-kyverno-101/"&gt;Kyverno 101 session&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you haven’t checked out the &lt;strong&gt;Kyverno hands-on lab&lt;/strong&gt; before which I prepared, you can go to that lab from &lt;a href="https://cloudyuga.guru/hands_on_lab/kyverno-introduction"&gt;here&lt;/a&gt; but make sure to read the complete blog first 😃&lt;/p&gt;
&lt;h2&gt;
  
  
  Applying For LFX Mentorship
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;I decided to apply for LFX mentorship for the spring 2022 cohort for Kyverno.&lt;/em&gt; The &lt;a href="https://github.com/cncf/mentoring"&gt;CNCF mentoring repository&lt;/a&gt; helped me a lot to know about the projects participating in LFX mentorship for a particular cohort along with the respective mentors. I applied through the &lt;a href="https://lfx.linuxfoundation.org/tools/mentorship/"&gt;LFX mentorship portal&lt;/a&gt; where for a particular cohort you can apply to a &lt;strong&gt;max of three projects&lt;/strong&gt; where first you have to create your profile, tell a bit about your background and then apply to the projects you want.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;After a few days, I got my selection email for being selected as a mentee for CNCF-Kyverno&lt;/em&gt;🥳&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1498179098568708098-257" src="https://platform.twitter.com/embed/Tweet.html?id=1498179098568708098"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1498179098568708098-257');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1498179098568708098&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  My 12 Weeks Mentorship Journey
&lt;/h2&gt;

&lt;p&gt;My mentorship period was from 1st March 2022 to 31st May 2022. During this period I have to work with &lt;a href="https://github.com/kyverno/policies"&gt;Kyverno policies&lt;/a&gt; where I have to write test cases for it using Kyverno CLI.More specifically I have to write test cases along with other required manifests for &lt;br&gt;
validate and mutate policies and check them using &lt;code&gt;kyverno apply&lt;/code&gt;and &lt;code&gt;kyverno test&lt;/code&gt; CLI commands.&lt;/p&gt;

&lt;p&gt;With the help of my mentors, I first went through the various Kyverno policies and run them locally to get a better understanding of them. Then I learned about how Kyverno CLI works and how one can write the test cases to validate and mutate policies along with the variables manifests.&lt;br&gt;
Then I listed out the policies for both validate and mutate for which test cases need to be written. There were about &lt;strong&gt;40+ policies&lt;/strong&gt; which have to work.👩‍💻  &lt;/p&gt;

&lt;p&gt;Every week I used to have a daily stand-up meeting with my mentors other than having discussions on the communication channel where we discussed policies and the respective &lt;strong&gt;positive and negative cases&lt;/strong&gt; related to it and the working of the policies.&lt;br&gt;
I used to get stuck most of the time while creating variables manifests which is required for test cases, but I am grateful to my mentors and maintainers of the project who always guided me whenever I get stuck.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The most important suggestion I used to get is to check the working of the policies on the Kubernetes cluster as a user to get a better understanding of it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And finally after writing test cases for all the validate and mutate policies I made the respective Pull Requests to get them reviewed and merged. I am grateful to the reviewers of my Pull Requests who helped me in getting it merged by giving valuable suggestions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Graduation From LFX Mentorship
&lt;/h2&gt;

&lt;p&gt;And &lt;strong&gt;31st May 2022&lt;/strong&gt; was the last day of my LFX mentorship and after being getting evaluated by mentors, I successfully graduated from it.🎓   &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U93PNddU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a51rd8hq3i938w0u8tkb.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U93PNddU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a51rd8hq3i938w0u8tkb.JPG" alt="My LFX graduation" width="728" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  My Pull Requests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/kyverno/policies/pull/330"&gt;Validate Test Cases&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/kyverno/policies/pull/327"&gt;Mutate Test Cases&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In the End
&lt;/h2&gt;

&lt;p&gt;At last, I am grateful to the Kyverno community and everyone who helped me in completing the LFX mentorship and gave me the most wonderful learning experience.🙏   &lt;/p&gt;

&lt;p&gt;Thank you for reading the blog. Hope this will help you to get started. You can connect with me on &lt;a href="https://twitter.com/oshi1136"&gt;Twitter &lt;/a&gt;and &lt;a href="https://www.linkedin.com/in/oshi-gupta-512716178/"&gt;LinkedIn&lt;/a&gt;😊 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All the very best and take care!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudnative</category>
      <category>kubernetes</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>MLOps with CML</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Tue, 07 Dec 2021 12:31:55 +0000</pubDate>
      <link>https://dev.to/oshi36/mlops-with-cml-1oaa</link>
      <guid>https://dev.to/oshi36/mlops-with-cml-1oaa</guid>
      <description>&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;p&gt;Managing machine learning model is a &lt;strong&gt;tedious job&lt;/strong&gt; and specially when dealing with large datasets.To automate a machine learning model like to &lt;strong&gt;train it,evaluate it&lt;/strong&gt; can be done by using &lt;a href="https://cml.dev/"&gt;CML&lt;/a&gt;(Continuous Machine Learning) as a part of MLOps(Machine Learning Operations) which is a &lt;strong&gt;CI/CD tool&lt;/strong&gt; for Machine Learning projects.&lt;/p&gt;

&lt;p&gt;In the following workflow a &lt;strong&gt;tensorflow regression model&lt;/strong&gt; is trained with CML and along with it's &lt;strong&gt;model performance&lt;/strong&gt; which is also recorded and will be generated on a &lt;strong&gt;PUSH GitHub event&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mlops-tensorflow-regression&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;ubuntu-latest&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;docker://dvcorg/cml-py3:latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Train&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;model'&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;repo_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;# Your ML workflow goes here&lt;/span&gt;
          &lt;span class="s"&gt;pip install -r requirements.txt&lt;/span&gt;
          &lt;span class="s"&gt;python model.py&lt;/span&gt;

          &lt;span class="s"&gt;echo "## Model Metrics" &amp;gt; report.md&lt;/span&gt;
          &lt;span class="s"&gt;cat metrics.txt &amp;gt;&amp;gt; report.md&lt;/span&gt;

          &lt;span class="s"&gt;echo "\n## Model Performance" &amp;gt;&amp;gt; report.md&lt;/span&gt;
          &lt;span class="s"&gt;echo "Model performance metrics are on the plot below." &amp;gt;&amp;gt; report.md&lt;/span&gt;

          &lt;span class="s"&gt;cml-publish model_results.png --md &amp;gt;&amp;gt; report.md&lt;/span&gt;

          &lt;span class="s"&gt;cml-send-comment report.md&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This model metrics will be sent with an &lt;strong&gt;email&lt;/strong&gt; and also on &lt;strong&gt;pushing the code&lt;/strong&gt; from GitHub bot.&lt;/p&gt;

&lt;p&gt;This is what model performance looks like when you push the code and run the above workflow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first image is of getting reply after pushing the code&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fWdIYPGO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqlo68qpf5tfagkif14q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fWdIYPGO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqlo68qpf5tfagkif14q.png" alt="Model Performance after code commit" width="731" height="847"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The second image is about getting results on an email&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BzMZbL7s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5biddq1gvp0h5zn3tyoh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BzMZbL7s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5biddq1gvp0h5zn3tyoh.jpg" alt="Model Performance as an email" width="800" height="615"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This workflow falls in the category of &lt;strong&gt;DIY Deployments&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/oshi36"&gt;
        oshi36
      &lt;/a&gt; / &lt;a href="https://github.com/oshi36/ml-ops-cml"&gt;
        ml-ops-cml
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      To automate a machine  learning model with the help of CML (Continuous Machine Learning) with GitHub Actions.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
ML-Ops-CML&lt;/h1&gt;
&lt;p&gt;To automate a machine  learning model with the help of CML (Continuous Machine Learning) with GitHub Actions.&lt;/p&gt;
&lt;p&gt;For this a &lt;strong&gt;Tensorflow Regression&lt;/strong&gt; model is created in &lt;code&gt;model.py&lt;/code&gt; and python libraries requirements in &lt;code&gt;requirements.txt&lt;/code&gt;. &lt;br&gt;
&lt;br&gt;
A GitHub Action with &lt;a href="https://cml.dev/" rel="nofollow"&gt;CML&lt;/a&gt; is made inside &lt;code&gt;.github/workflows/&lt;/code&gt; which will train the model and find out the metrics and plot a graph on it. &lt;br&gt;
&lt;br&gt;
This GitHub Action will work on &lt;strong&gt;PUSH events&lt;/strong&gt; and will train the model as you do commit &lt;br&gt;
After the training model performance wil be send as a reply to the commit and to the registered GitHub Email as well as shown in the image below&lt;/p&gt;
&lt;h3&gt;
Model Performance details as a comment &lt;br&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/oshi36/ml-ops-cml/blob/main/plot.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qh7nKk32--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/oshi36/ml-ops-cml/raw/main/plot.png" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Model Performance details in an Email &lt;br&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/oshi36/ml-ops-cml/blob/main/email_image_updated.jpg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4L-5hVEn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/oshi36/ml-ops-cml/raw/main/email_image_updated.jpg" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/oshi36/ml-ops-cml"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Thank You for reading this as this was my first Github Actions and I really enjoyed and learnt new while building this and a huge thank you to the Dev community and GitHub organization for organising this Github Actions hackathon.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>actionshackathon21</category>
      <category>github</category>
      <category>mlops</category>
    </item>
    <item>
      <title>Dart In Appwrite</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Sun, 31 Oct 2021 17:16:56 +0000</pubDate>
      <link>https://dev.to/oshi36/dart-in-appwrite-47e</link>
      <guid>https://dev.to/oshi36/dart-in-appwrite-47e</guid>
      <description>&lt;p&gt;In the &lt;a href="https://dev.to/oshi36/kotlin-in-appwrite-7n2"&gt;previous blog&lt;/a&gt; we have seen about how to use Kotlin in Appwrite. Now we will be seeing about how to use Dart in Appwrite.&lt;/p&gt;

&lt;p&gt;As we &lt;a href="https://appwrite.io/docs/sdks"&gt;Dart SDK&lt;/a&gt; is one of the server SDKs in Appwrite but first let's know what is Dart?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dart.dev/"&gt;Dart&lt;/a&gt; is an open-source, general-purpose, object-oriented programming language with C-style syntax developed by Google in 2011. The purpose of Dart programming is to create a frontend user interfaces for the web and mobile apps.&lt;/p&gt;

&lt;p&gt;So now how to write Dart in Appwrite function and how to install Dart SDK for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dart SDK Installation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add this to your package's pubspec.yaml file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nl"&gt;dependencies:&lt;/span&gt;
  &lt;span class="nl"&gt;dart_appwrite:&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You can install packages from the command line:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;pub&lt;/span&gt; &lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="n"&gt;dart_appwrite&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add the function
&lt;/h3&gt;

&lt;p&gt;You can add a new function from your &lt;strong&gt;Appwrite project's dashboard&lt;/strong&gt;. Access your Functions settings from your project's left navigation panel. Click the &lt;strong&gt;Add Function&lt;/strong&gt; button and choose your function name and code runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Init your SDK
&lt;/h3&gt;

&lt;p&gt;Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key project API keys section.&lt;br&gt;
This can be found out when you &lt;a href="https://appwrite.io/docs/installation"&gt;install Appwrite&lt;/a&gt; according to the Operating System and access the Appwrite Console UI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Make your first request
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Users&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'email@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'password'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we will be seeing different operations which can be performed on these functions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create functions&lt;/strong&gt; : To create a new function by passing various &lt;em&gt;parameters like name , runtime&lt;/em&gt; etc.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// Init SDK&lt;/span&gt;
  &lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Functions&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Future&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;'[NAME]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;execute:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
    &lt;span class="nl"&gt;runtime:&lt;/span&gt; &lt;span class="s"&gt;'dotnet-5.0'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List functions&lt;/strong&gt; : To get a list of all the project's functions. You can use the query params to filter your results.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// Init SDK&lt;/span&gt;
  &lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Functions&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Future&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get function&lt;/strong&gt; : It will get a function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// Init SDK&lt;/span&gt;
  &lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Functions&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Future&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;functionId:&lt;/span&gt; &lt;span class="s"&gt;'[FUNCTION_ID]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Update function&lt;/strong&gt; : It will update the function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// Init SDK&lt;/span&gt;
  &lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Functions&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Future&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;functionId:&lt;/span&gt; &lt;span class="s"&gt;'[FUNCTION_ID]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;'[NAME]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;execute:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Delete function&lt;/strong&gt; : It will delete a function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:dart_appwrite/dart_appwrite.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// Init SDK&lt;/span&gt;
  &lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;Functions&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://[HOSTNAME_OR_IP]/v1'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'5df5acd0d48c2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'919c2d18fb5d4...a2ae413da83346ad2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
  &lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Future&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;functionId:&lt;/span&gt; &lt;span class="s"&gt;'[FUNCTION_ID]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;result&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So this is the basic idea of how to create functions in the Appwrite using the Dart SDK.&lt;/p&gt;

&lt;p&gt;For more you can always refer to &lt;a href="https://appwrite.io/docs/getting-started-for-server"&gt;Appwrite docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank You&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>appwrite</category>
      <category>sdk</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Kotlin In Appwrite</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Thu, 28 Oct 2021 09:16:28 +0000</pubDate>
      <link>https://dev.to/oshi36/kotlin-in-appwrite-7n2</link>
      <guid>https://dev.to/oshi36/kotlin-in-appwrite-7n2</guid>
      <description>&lt;p&gt;&lt;a href="https://appwrite.io/"&gt;Appwrite&lt;/a&gt; is an &lt;strong&gt;end-to-end backend server&lt;/strong&gt; that is aiming to abstract the complexity of common, complex, and repetitive tasks required for building a modern app.&lt;/p&gt;

&lt;p&gt;Appwrite is both cross-platform and technology agnostic, meaning it can run on any operating system, coding language, framework, or platform. Although Appwrite can easily fit the definition of serverless technology, it's designed to run well in multiple configurations. &lt;br&gt;
It provides various libraries for major programming languages and platforms so you don't have to write code for interacting with our HTTP APIs from scratch.&lt;/p&gt;

&lt;p&gt;Appwrite has divided &lt;a href="https://appwrite.io/docs/sdks"&gt;SDKs&lt;/a&gt; into two categories &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client SDKs&lt;/li&gt;
&lt;li&gt;Server SDKs&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Client SDKs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Web SDK&lt;/li&gt;
&lt;li&gt;Flutter SDK&lt;/li&gt;
&lt;li&gt;Apple SDK&lt;/li&gt;
&lt;li&gt;Android SDK&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Server SDKs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Kotlin SDK&lt;/li&gt;
&lt;li&gt;Dart SDK&lt;/li&gt;
&lt;li&gt;Swift SDK&lt;/li&gt;
&lt;li&gt;Python SDK&lt;/li&gt;
&lt;li&gt;Ruby SDK and etc&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Here we will be seeing how to use kotlin in Appwrite functions
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;So what is Kotlin?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kotlinlang.org/"&gt;Kotlin&lt;/a&gt; is a cross-platform, statically typed, general-purpose programming language with type inference.&lt;/p&gt;

&lt;p&gt;Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise. &lt;/p&gt;

&lt;p&gt;So how to write kotlin in appwrite function and for this install &lt;a href="https://github.com/appwrite/sdk-for-kotlin"&gt;Kotlin SDK&lt;/a&gt; by following the below instructions&lt;/p&gt;
&lt;h3&gt;
  
  
  GRADLE
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Appwrite's Kotlin SDK is hosted on Maven Central. In order to fetch the Appwrite SDK, add this to your root-level build.gradle(.kts) file:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;&lt;span class="k"&gt;repositories&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;      
    &lt;span class="n"&gt;mavenCentral&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Next, add the dependency to your project's build.gradle(.kts) file:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;&lt;span class="k"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;implementation&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"io.appwrite:sdk-for-kotlin:"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  MAVEN
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add this to your &lt;strong&gt;pom.xml&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;io.appwrite&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;sdk-for-kotlin&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;0.1.1&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Add the function
&lt;/h3&gt;

&lt;p&gt;You can add a new function from your Appwrite project's dashboard. Access your Functions settings from your project's left navigation panel. Click the &lt;strong&gt;Add Function&lt;/strong&gt; button and choose your function name and code runtime.&lt;/p&gt;
&lt;h3&gt;
  
  
  Init your SDK
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key project API keys section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can be found out when you &lt;a href="https://appwrite.io/docs/installation"&gt;install&lt;/a&gt; Appwrite according to the Operating System and access the &lt;strong&gt;Appwrite Console UI&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.Client&lt;/span&gt;

&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//[HOSTNAME_OR_IP]/v1') // Your API Endpoint&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="n"&gt;df5acd0d48c2&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="mi"&gt;919&lt;/span&gt;&lt;span class="n"&gt;c2d18fb5d4&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a2ae413da83346ad2&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Make your First Request
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.services.Users&lt;/span&gt;

&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;users&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Users&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;res&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="nd"&gt;email@&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As of now, we have seen how to set up the functions and Kotlin SDK. &lt;br&gt;
Now, we will be seeing different operations which can be performed on these functions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create functions&lt;/strong&gt; :
To create a new function with help of Kotlin
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.Client&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.services.Functions&lt;/span&gt;

&lt;span class="k"&gt;suspend&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://[HOSTNAME_OR_IP]/v1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setProject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"5df5acd0d48c2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your project ID&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"919c2d18fb5d4...a2ae413da83346ad2"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your secret API key&lt;/span&gt;

    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;functions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[NAME]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;execute&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"dotnet-5.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List functions&lt;/strong&gt; :
To get a list of all the project's functions. You can use the query params to filter your results.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.Client&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.appwrite.services.Functions&lt;/span&gt;
&lt;span class="k"&gt;suspend&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;client&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://[HOSTNAME_OR_IP]/v1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key &lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;functions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Functions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get function&lt;/strong&gt; :
It will get a function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;functionId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[FUNCTION_ID]"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Update function&lt;/strong&gt; :
It will update the function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; 
&lt;span class="n"&gt;functionId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[FUNCTION_ID]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[NAME]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="n"&gt;execute&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; 
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Delete function&lt;/strong&gt; :
It will delete a function by its unique ID.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;functionId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[FUNCTION_ID]"&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create execution&lt;/strong&gt; :
Trigger a function execution. The returned object will return you the current execution status. You can ping the Get Execution endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;response&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createExecution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;functionId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"[FUNCTION_ID]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So this is the basic idea of how to create functions in the Appwrite using the Kotlin SDK.&lt;br&gt;
For more you can always refer to &lt;a href="https://appwrite.io/docs/getting-started-for-server"&gt;appwrite&lt;/a&gt; &lt;a href="https://appwrite.io/docs/functions"&gt;docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank You&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>kotlin</category>
      <category>appwrite</category>
      <category>android</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Postman API Development 101</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Sun, 02 May 2021 07:35:14 +0000</pubDate>
      <link>https://dev.to/oshi36/postman-api-development-101-406o</link>
      <guid>https://dev.to/oshi36/postman-api-development-101-406o</guid>
      <description>&lt;p&gt;Yesterday, I attended an awesome session on API development 101 by Postman student community manager Ali Mustufa Shaikh organized by HackOn foundation for the upcoming HackOn2.0 hackathon.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_FcaXSYZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yg1ts6xwkp9cp13wjtu4.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_FcaXSYZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yg1ts6xwkp9cp13wjtu4.JPG" alt="Alt Text" width="800" height="717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, I am going to share what I had learned in the session.&lt;/p&gt;

&lt;p&gt;1.What is API?&lt;/p&gt;

&lt;p&gt;API (Application Programming Interface) is an interface that defines interactions between multiple software applications or mixed hardware-software intermediaries.&lt;br&gt;
APIs interact with the server using endpoint where they send and receive the request and update the information making it available to the user.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;2.What is Postman and why use it?&lt;/p&gt;

&lt;p&gt;Postman is an API(application programming interface) development tool that helps to build, test, and modify APIs. It has the ability to make various types of HTTP requests(GET, POST, PUT, PATCH), saving environments for later use, converting the API to code for various languages(like JavaScript, Python).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Postman&lt;/strong&gt; - It has a wide range of functionality like support for all possible HTTP methods, saving progress, API to code conversion, testing of APIs that can be scheduled and automated.&lt;br&gt;
It helps to see the status codes, time is taken for a response and other performance parameters.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;3.Requests&lt;/p&gt;

&lt;p&gt;There are many methods that help in making requests but few of them are GET, POST, PUT, DELETE.&lt;br&gt;
Requests can be made using methods, address(URL), path.&lt;/p&gt;

&lt;p&gt;Some methods are :&lt;br&gt;
Get: For retrieving information &lt;br&gt;
Post: To send information &lt;br&gt;
Put: To update any information&lt;br&gt;
Delete: To delete information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt;: This means the address of the website from which data has to be fetched.&lt;br&gt;
&lt;strong&gt;Path&lt;/strong&gt;: It is the destination where the request can get executed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BlH5Bx0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwuy5tgw1q4pxnvugrwx.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BlH5Bx0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwuy5tgw1q4pxnvugrwx.JPG" alt="Alt Text" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's understand this with example.&lt;br&gt;
&lt;code&gt;https://www.google.com/&lt;/code&gt; is the address of google's homepage.&lt;br&gt;
When you search anything on it, it will take you to results according to the search.&lt;br&gt;
On observing you will find it in URL, it adds /search path to the URL and from there one get their searched results. &lt;code&gt;https://www.google.com/search&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Along with this request URL also takes the parameter which is mostly key-value pairs. These parameters are of two types:&lt;/p&gt;

&lt;p&gt;i) Query Parameter: These are appended to the end of the request URL, Query parameters are appended to the end of the request URL, following '?' and listed in key-value pairs, separated by '&amp;amp;' &lt;br&gt;
ii) Path Parameters: These are part of the request URL, which are accessed using the placeholders preceded by ':' &lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;4.Responses&lt;/p&gt;

&lt;p&gt;Methods to Receiving Response of the request :&lt;br&gt;
i) Status Code -  They are HTTP codes that tell if the request made is successful or not.&lt;br&gt;
ii) Headers&lt;br&gt;
iii) Accessing Body Data - It contains all the information to which the server responds back to your request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Different HTTP Status Codes&lt;/strong&gt; &lt;br&gt;
1xx: Informational – Communicates transfer protocol-level information.&lt;br&gt;
2xx: Success – Indicates that the client’s request was accepted successfully.&lt;br&gt;
3xx: Redirection – Indicates that the client must take some additional action in order to complete their request.&lt;br&gt;
4xx: Client Error – This category of error status codes points the finger at clients.&lt;br&gt;
5xx: Server Error – The server takes responsibility for these error status codes.&lt;/p&gt;



&lt;p&gt;Also done the hands-on session on the Postman workspace and got familiar with its interface and how to send requests and receive responses.&lt;br&gt;
Learned about the student programs that Postman offers along with its benefits.&lt;/p&gt;

</description>
      <category>api</category>
      <category>postman</category>
      <category>learning</category>
    </item>
    <item>
      <title>Ordered Vs Unordered In Python</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Wed, 28 Apr 2021 18:44:00 +0000</pubDate>
      <link>https://dev.to/oshi36/ordered-vs-unordered-in-python-5a2j</link>
      <guid>https://dev.to/oshi36/ordered-vs-unordered-in-python-5a2j</guid>
      <description>&lt;p&gt;There are different types of data structures in Python such as lists, tuples, dictionaries, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lists
&lt;/h3&gt;

&lt;p&gt;It is a collection of a mutable &lt;strong&gt;ordered&lt;/strong&gt; sequence of elements and can be accessed through indexing and defined inside []. Each element inside the list is called an item.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikrjquf5d5k4mhw4m597.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikrjquf5d5k4mhw4m597.JPG" alt="List Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above image, it is clearly seen that list remembers the order of insertion or follows a sequence in which elements are inserted. &lt;/p&gt;

&lt;h3&gt;
  
  
  Tuples
&lt;/h3&gt;

&lt;p&gt;It is a collection of &lt;strong&gt;ordered&lt;/strong&gt; and immutable elements. Tuples are sequences, just like lists. It is defined inside () and can be accessed through indexing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu72odcncvq4iyom4uojw.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu72odcncvq4iyom4uojw.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above image shows that the tuple is ordered data structure and follows the insertion sequence.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dictionary
&lt;/h3&gt;

&lt;p&gt;It is a collection in which items are defined in key-value pairs inside {}. These items are &lt;strong&gt;unordered&lt;/strong&gt;, changeable, and value is accessed through the particular key.&lt;br&gt;
Each key is separated from its value by a colon (:), the items are separated by commas.&lt;br&gt;
Keys are unique within a dictionary while values may not be. The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, numbers, or tuples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykpiuaiebc8yn4s2zri8.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fykpiuaiebc8yn4s2zri8.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, the order of insertion and output of the dictionary is different but what remains the same is the mapping of values with keys as the positioning might &lt;br&gt;
vary.&lt;/p&gt;

&lt;p&gt;In the dictionary, we don't access items based on position unlike in lists and tuples but through keys.&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How To Deal With Imposter Syndrome?</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Wed, 24 Feb 2021 06:42:40 +0000</pubDate>
      <link>https://dev.to/oshi36/how-to-deal-with-imposter-syndrome-24nk</link>
      <guid>https://dev.to/oshi36/how-to-deal-with-imposter-syndrome-24nk</guid>
      <description>&lt;p&gt;&lt;em&gt;Have you ever felt like you don’t belong? Like your friends or colleagues are going to discover you’re a fraud, and you don’t actually deserve your job and accomplishments? Sometimes you think about others as they are achieving so much and compare yourself to them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most of us have experienced this at some point in our lives and even I suffered personally. And if you feel the same then probably you're suffering from imposter syndrome.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Imposter Syndrome?
&lt;/h1&gt;

&lt;p&gt;Impostor syndrome—the idea that you’ve only succeeded due to luck, and not because of your talent or qualifications—was first identified in 1978 by psychologists Pauline Rose Clance and Suzanne Imes.&lt;/p&gt;

&lt;p&gt;It’s that stomach-plunging fear that you’ll be revealed as a fraud who has no idea what they’re doing.&lt;br&gt;
It's normal to get it and there is no harm in accepting that and one can easily come out of it. &lt;br&gt;
It's common among high-achievers and people with perfectionist tendencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some tips to deal and get rid of imposter syndrome
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Know the signs&lt;/strong&gt; We often overlook the signs of imposter syndrome that we came across in our day-to-day lives. But recognizing these steps is the first step in coping with imposter syndrome.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Some of them are:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;You feel like you "got lucky" when you actually prepared well and worked hard.&lt;/li&gt;
&lt;li&gt;You find it hard to accept praise.&lt;/li&gt;
&lt;li&gt;You apologize for yourself when you didn't actually do something wrong.&lt;/li&gt;
&lt;li&gt;You hold yourself to incredibly -- sometimes impossibly -- 
high standards.&lt;/li&gt;
&lt;li&gt;You find the fear of failure paralyzing.&lt;/li&gt;
&lt;li&gt;You avoid expressing confidence because you think people will see it as overcompensating or obnoxious.&lt;/li&gt;
&lt;li&gt;You're convinced you're not enough.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And once you know then help yourself to get away from it!!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Break the silence:&lt;/strong&gt; When you came to know about it, don't feel shy and shame to talk about it. Discuss with your close ones, with your family, friends, colleagues to whomsoever you are comfortable with it. Talk about it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accentuate the positive:&lt;/strong&gt; The good news is being a perfectionist means you care deeply about the quality of your work. The key is to continue to strive for excellence when it matters most, but don’t persevere over routine tasks and forgive yourself when the inevitable mistake happens. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Develop a healthy response to failure and mistake making:&lt;/strong&gt;  Henry Ford once said,  &lt;em&gt;"Failure is only the opportunity to begin again more intelligently"&lt;/em&gt;. Instead of beating yourself up for falling short, do what players on the losing sports team do and glean the learning value from the loss, and move on reminding yourself, “I’ll get ’em next time.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Right the rules:&lt;/strong&gt; If you’ve been operating under misguided rules like, “I should always know the answer,” or “Never ask for help” start asserting your rights. Recognize that you have just as much right as the next person to be wrong, have an off-day, or ask for assistance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualize success:&lt;/strong&gt; Do what professional athletes do. Spend time beforehand picturing yourself making a successful presentation or calmly posing your question in class. It sure beats picturing impending disaster and will help with performance-related stress. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reward yourself:&lt;/strong&gt; Break the cycle of continually seeking, and then dismissing validation outside of yourself by learning to pat yourself on the back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In today’s workplaces, where all kinds of different people with distinct experiences, perspectives, and expectations are asked to collaborate,  &lt;em&gt;the bottom line with imposter syndrome is this:&lt;/em&gt; &lt;strong&gt;Everyone’s in the same boat. Nobody’s an imposter.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Confronted with that simple fact, all that’s left is to engage with your work and apply who you already are.&lt;/p&gt;

&lt;p&gt;That’s always enough.&lt;/p&gt;

</description>
      <category>mentalhealth</category>
      <category>healthydebate</category>
    </item>
    <item>
      <title>Java Problem</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Sun, 07 Feb 2021 13:32:08 +0000</pubDate>
      <link>https://dev.to/oshi36/java-problem-3d9d</link>
      <guid>https://dev.to/oshi36/java-problem-3d9d</guid>
      <description>&lt;p&gt;I am having problem while solving this question in java. Please help me in solving this!!&lt;/p&gt;

&lt;h4&gt;
  
  
  Question :
&lt;/h4&gt;

&lt;p&gt;Write a java program to print even numbers after odd times jump.&lt;br&gt;
Ex - 2,6,14,26...&lt;/p&gt;

&lt;p&gt;2 (then jump 1 even number 4)-6&lt;/p&gt;

&lt;p&gt;6 (then jump 3 even numbers 8,10,12)-14&lt;/p&gt;

&lt;p&gt;14 (then jump 5 even numbers 16,18,20,22,24)-26&lt;/p&gt;

</description>
      <category>java</category>
      <category>coding</category>
      <category>doubt</category>
      <category>learning</category>
    </item>
    <item>
      <title>Git &amp; Github Commands</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Wed, 03 Feb 2021 08:38:14 +0000</pubDate>
      <link>https://dev.to/oshi36/git-github-commands-12bp</link>
      <guid>https://dev.to/oshi36/git-github-commands-12bp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Smarter cloning, forking, merging, branching, documenting, sharing, and automating with Git and GitHub and contribute to open source.&lt;/strong&gt;&lt;br&gt;
Git is a distributed version control system, originally written by Linus Torvalds in 2005 for and with help from the Linux kernel community.Git is a modern and widely used distributed version control system in the world. It is developed to manage projects with high speed and efficiency. The version control system allows us to monitor and work together with our team members at the same workspace.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Git?
&lt;/h1&gt;

&lt;p&gt;Git is an open-source distributed version control system. It is designed to handle minor to major projects with high speed and efficiency. It is developed to co-ordinate the work among the developers. The version control allows us to track and work together with our team members at the same workspace.&lt;br&gt;
Git is foundation of many services like GitHub and GitLab, but we can use Git without using any other Git services. Git can be used privately and publicly.&lt;br&gt;
Git was created by Linus Torvalds in 2005 to develop Linux Kernel. It is also used as an important distributed version-control tool for the DevOps.&lt;br&gt;
Git is easy to learn, and has fast performance. It is superior to other SCM tools like Subversion, CVS, Perforce, and ClearCase.&lt;/p&gt;

&lt;p&gt;The following are some commands which one can use to start with open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Cheat Sheet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Git configuration
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git config&lt;/strong&gt;&lt;br&gt;
Get and set configuration variables that control all facets of how Git looks and operates.&lt;br&gt;
Set the name:&lt;br&gt;
$ git config — global user.name “username”&lt;br&gt;
Set the email:&lt;br&gt;
$ git config — global user.email “&lt;a href="mailto:useremail@gmail.com"&gt;useremail@gmail.com&lt;/a&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Starting a project
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git init&lt;/strong&gt;&lt;br&gt;
Create a local repository:&lt;br&gt;
$ git init&lt;br&gt;
&lt;strong&gt;Git clone&lt;/strong&gt;&lt;br&gt;
Make a local copy of the server repository.&lt;br&gt;
$ git clone&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Local changes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git add&lt;/strong&gt;&lt;br&gt;
Add a file to staging (Index) area:&lt;br&gt;
$ git add Filename&lt;br&gt;
Add all files of a repo to staging (Index) area:&lt;br&gt;
$ git add .&lt;br&gt;
&lt;strong&gt;Git commit&lt;/strong&gt;&lt;br&gt;
Record or snapshots the file permanently in the version history with a message.&lt;br&gt;
$ git commit -m “ Commit Message”&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Track changes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git diff&lt;/strong&gt;&lt;br&gt;
Track the changes that have not been staged: $ git diff&lt;br&gt;
Track the changes that have staged but not committed:&lt;br&gt;
$ git diff — staged&lt;br&gt;
Track the changes after committing a file:&lt;br&gt;
$ git diff HEAD&lt;br&gt;
Track the changes between two commits:&lt;br&gt;
$ git diff Git Diff Branches:&lt;br&gt;
$ git diff &amp;lt; branch 2&amp;gt;&lt;br&gt;
&lt;strong&gt;Git status&lt;/strong&gt;&lt;br&gt;
Display the state of the working directory and the staging area.&lt;br&gt;
$ git status&lt;br&gt;
Git show Shows objects:&lt;br&gt;
$ git show&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Commit History
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git log&lt;/strong&gt;&lt;br&gt;
Display the most recent commits and the status of the head:&lt;br&gt;
$ git log&lt;br&gt;
Display the output as one commit per line:&lt;br&gt;
$ git log -oneline&lt;br&gt;
Displays the files that have been modified:&lt;br&gt;
$ git log -stat&lt;br&gt;
Display the modified files with location:&lt;br&gt;
$ git log -p&lt;br&gt;
&lt;strong&gt;Git blame&lt;/strong&gt;&lt;br&gt;
Display the modification on each line of a file:&lt;br&gt;
$ git blame &lt;/p&gt;

&lt;h3&gt;
  
  
  6. Ignoring files
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;.gitignore&lt;/strong&gt;&lt;br&gt;
Specify intentionally untracked files that Git should ignore. Create .gitignore:&lt;br&gt;
$ touch .gitignore List the ignored files.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Branching
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git branch Create branch:&lt;/strong&gt;&lt;br&gt;
$ git branch List Branch:&lt;br&gt;
$ git branch — list Delete a Branch:&lt;br&gt;
$ git branch -d Delete a remote Branch:&lt;br&gt;
$ git push origin -delete Rename Branch:&lt;br&gt;
$ git branch -m&lt;br&gt;
&lt;strong&gt;Git checkout&lt;/strong&gt;&lt;br&gt;
Switch between branches in a repository.&lt;br&gt;
Switch to a particular branch:&lt;br&gt;
$ git checkout&lt;br&gt;
Create a new branch and switch to it:&lt;br&gt;
$ git checkout -b Checkout a Remote branch:&lt;br&gt;
$ git checkout&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Merging
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git merge&lt;/strong&gt;&lt;br&gt;
Merge the branches:&lt;br&gt;
$ git merge&lt;br&gt;
Merge the specified commit to currently active branch:&lt;br&gt;
$ git merge&lt;br&gt;
&lt;strong&gt;Git rebase&lt;/strong&gt;&lt;br&gt;
Apply a sequence of commits from distinct branches into a final commit.&lt;br&gt;
$ git rebase&lt;br&gt;
Continue the rebasing process:&lt;br&gt;
$ git rebase -continue Abort the rebasing process:&lt;br&gt;
$ git rebase — skip&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Remote
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git remote&lt;/strong&gt;&lt;br&gt;
Check the configuration of the remote server:&lt;br&gt;
$ git remote -v&lt;br&gt;
Add a remote for the repository:&lt;br&gt;
$ git remote add Fetch the data from the remote server:&lt;br&gt;
$ git fetch&lt;br&gt;
&lt;strong&gt;Git origin master&lt;/strong&gt;&lt;br&gt;
Push data to the remote server:&lt;br&gt;
$ git push origin master Pull data from remote server:&lt;br&gt;
$ git pull origin master&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Pushing Updates
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git push&lt;/strong&gt;&lt;br&gt;
Transfer the commits from your local repository to a remote server. Push data to the remote server:&lt;br&gt;
$ git push origin master Force push data:&lt;br&gt;
$ git push -f&lt;br&gt;
Delete a remote branch by push command:&lt;br&gt;
$ git push origin -delete edited&lt;/p&gt;

&lt;h3&gt;
  
  
  11. Pulling updates
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git pull&lt;/strong&gt;&lt;br&gt;
Pull the data from the server:&lt;br&gt;
$ git pull origin master&lt;br&gt;
Pull a remote branch:&lt;br&gt;
$ git pull&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Undo changes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git revert&lt;/strong&gt;&lt;br&gt;
Undo the changes:&lt;br&gt;
$ git revert&lt;br&gt;
Revert a particular commit:&lt;br&gt;
$ git revert&lt;br&gt;
&lt;strong&gt;Git reset&lt;/strong&gt;&lt;br&gt;
Reset the changes:&lt;br&gt;
$ git reset -hard&lt;br&gt;
$ git reset -soft:&lt;br&gt;
$ git reset — mixed&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Removing files
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Git rm&lt;/strong&gt;&lt;br&gt;
Remove the files from the working tree and from the index:&lt;br&gt;
$ git rm &lt;br&gt;
Remove files from the Git But keep the files in your local repository:&lt;br&gt;
$ git rm — cached&lt;/p&gt;

&lt;p&gt;Happy Learning! Explore the open source world.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>My First Experience : MLH Local Hack Day</title>
      <dc:creator>Oshi Gupta</dc:creator>
      <pubDate>Sun, 17 Jan 2021 16:51:21 +0000</pubDate>
      <link>https://dev.to/oshi36/my-first-experience-mlh-local-hack-day-52k8</link>
      <guid>https://dev.to/oshi36/my-first-experience-mlh-local-hack-day-52k8</guid>
      <description>&lt;p&gt;Hello all! I want to share with all of you that I have participated in Major League Hacking Build series knowns as MLH-LHD . Every day I am exploring new hacks and challenges.&lt;br&gt;
I like this event every much there are so many technologies about which you will come to know and build something new.&lt;br&gt;
One of the best thing is that it has Daily and Week long Challenges in which one have to make projects and MLH team guide you to make something and explore the technologies.&lt;br&gt;
I had learnt to make a Tic-Tac-Toe game in java.&lt;/p&gt;

</description>
      <category>mlh</category>
      <category>majorleaguehacking</category>
      <category>localhackday</category>
    </item>
  </channel>
</rss>
