Kind

In order to quicly bring up a new kubernetes cluster in your local laptop, then you can use kind. Kind ( Kubernetes in Docker) Kind basically creates the nodes as a containers and create a kubernetes cluster https://kind.sigs.k8s.io/ https://github.com/kubernetes-sigs/kind brew install kind Deploying a Single node cluster kind create cluster docker images kindest/node <none> d372b674475a 3 months ago 1.1GB docker ps -a 3047fe4988f4 kindest/node:v1.21.1 "/usr/local/bin/entr…" 8 days ago Up 8 days 127.0.0.1:50941->6443/tcp kind-control-plane docker exec -it kind-control-plane sh # crictl ps -a CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID be7d88399e276 1a1f05a2cd7c2 8 days ago Running coredns 0 bb3eb2d8b0138 dc91af853f8d4 1a1f05a2cd7c2 8 days ago Running coredns 0 72e459f147b24 2bcbac91131f1 2b703ea309660 8 days ago Running local-path-provisioner 0 1b9b5b3329128 3787410dc6121 f37b7c809e5dc 8 days ago Running kindnet-cni 0 66b72ef1c9758 af1073c036c7b 4bbef4ca108cd 8 days ago Running kube-proxy 0 e254cfacdfb75 b29d7fa01b9ea 05b738aa1bc63 8 days ago Running etcd 0 4109caeae008c cb638fbd4988d 18e61c783b417 8 days ago Running kube-apiserver 0 f87bb12d4816e 181e0b63e3db1 0c6dccae49de8 8 days ago Running kube-controller-manager 0 0d00a01acb283 ccd3b21c436ec 8c783dd252088 8 days ago Running kube-scheduler 0 72a8570b0c0b2 kubectl get cluster-info ...

September 18, 2021 · 2 min · Kiran Chavala

Using crictl and nerdctl

With the removal docker as the default container runtime in kubernetes. When a situation arises where you need to debug the container application container You can use Crictl and Nerdctl and debug the issue quickly Crictl Install crictl VERSION="v1.22.0" wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin Create a endpoint configuration file (crictl.yaml) Example To interact with containerd runtime env cat /etc/crictl.yaml runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock timeout: 2 debug: false pull-image-on-create: false To interact with docker runtime cat /etc/crictl.yaml runtime-endpoint: unix:///var/run/dockershim.sock image-endpoint: unix:///var/run/dockershim.sock timeout: 2 debug: false pull-image-on-create: false To interact with Crio runtime cat /etc/crictl.yaml runtime-endpoint: unix:///run/crio/crio.sock image-endpoint: unix:///run/crio/crio.sock timeout: 2 debug: false Execute the crictl commands Example: ...

August 23, 2021 · 2 min · Kiran Chavala

Accessing xencenter via browser

Currently to access and manage xenserver cluster you need a xencenter installed in a windows system. This could be a limitation for the users of linux and mac Meanwhile you can access vmware exsi servers and also manage the clusters of vcenter via http To overcome this limitation you can use the XCP hypervisor XCP is open source hypervisor based on XenServer. Download the XCP-ng https://xcp-ng.org/#easy-to-install https://xcp-ng.org/docs/install.html#iso-installation Install the xcp-center for windows systems to access the XCP hypervisors https://github.com/xcp-ng/xenadmin/releases/ ...

July 10, 2021 · 1 min · Kiran Chavala

Logstash Cloudstack

Using Elastic search is a great tool to analysze logs generated by your application Elastic search is made up of 3 parts Elastic search –> the core search engine Logstah –> to parse the logs Kibana –> visualization Here i have imported the cloudstack management server logs to the ELK and I can perform various analytics Follow the below link to set up your elk infrstructure https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04 Once done make sure your elastic, logstash, and kibana process are able to communicate with each other ...

June 13, 2021 · 1 min · Kiran Chavala

Terraformcloudstack

Terraform is a tool to deploy resources on cloud It is an infrastructure as code tool Generally the plugins are available at https://registry.terraform.io/ To use the plugins which are archived and not available in the terraform registry Follow the steps a small tweak is necessary Currently the cloudstack plugin is archived https://github.com/hashicorp/terraform-provider-cloudstack https://github.com/hashicorp/terraform-provider-cloudstack/blob/stable-website/website/docs/index.html.markdown Download the terrform provider for cloudstack based on the os you are running https://releases.hashicorp.com/terraform-provider-cloudstack/0.3.0/ On linux and mac Move it ...

May 31, 2021 · 1 min · Kiran Chavala

Raspberry pi

After hearing frequent mentions of Raspberry pi use cases, I had decided to buy Raspberry pi 4 model. The site https://www.thingbits.in was giving best discounts on pi and it’s accessories. The best use case of pi was the implementation of PI-HOLE which blocks all the ads on websites. Here are links i used for the complete installation of pi and implementation of PI-HOLE https://docs.pi-hole.net/ https://medium.com/swlh/how-to-set-up-pi-hole-2293246dc8ed https://filterlists.com/lists/pl-host-file

December 3, 2020 · 1 min · Kiran Chavala

Downloading songs from Spotify

To download the songs from spotify https://gist.github.com/kiranchavala/36afff2694c620421e26dd8c85cd74a4 References https://github.com/SathyaBhat/spotify-dl https://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/ https://medium.com/@sachithmuhandiram/youtube-dl-cheatsheet-bcc0782e7124

October 15, 2020 · 1 min · Kiran Chavala

K9scli

k9s is an excellent cli tool to interact with the kubernetes clusters brew install derailed/k9s/k9s Ref: https://k9scli.io/topics/install/ https://k9scli.io/

August 26, 2020 · 1 min · Kiran Chavala

Installing k3s

K3s is light weight kubernetes distribution from Rancher https://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744 Ref: https://k3s.io/ https://github.com/alexellis/k3sup

August 26, 2020 · 1 min · Kiran Chavala

Mergingkubeconfig

Merging kubeconfig files When you have multiple kubernetes clusters, manually entering to the kubectl config is time consuming and error prone Add the two config files to the env var export KUBECONFIG=/.kube/config:/Desktop/configFile2.yaml Review that you have two configurations in one view kubectl config view View the raw config and output to a new file kubectl config view –raw > test.yaml cp test.yaml .kube/config env you can unset the KUBECONFIG later on ...

August 25, 2020 · 1 min · Kiran Chavala