Install k3s and get the kubeconfig

sudo apt update adduser eramax usermod -aG sudo eramax curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=”644″ sh – kubectl get nodes cat /var/lib/rancher/k3s/server/node-token #Copy node token sudo kubectl create serviceaccount k8sadmin -n kube-system sudo kubectl create clusterrolebinding k8sadmin –clusterrole=cluster-admin –serviceaccount=kube-system:k8sadmin sudo kubectl -n kube-system describe secret $(sudo kubectl -n kube-system get secret | (grep k8sadmin || echo “$_”) | awk […]

Upgrade Your .NET Console App Experience

The lowly console application has gotten a sad reputation in the .NET ecosystem. Generally, the project format is relegated to the arena of the demonstration. We’re all guilty of starting and abandoning that ConsoleApp341 project. It is time the console app gets the respect it deserves. Source: khalidabuhakmeh.com/upgraded-dotnet-console-experience

NCurses Disk Usage

ncdu (NCurses Disk Usage) is a curses-based version of the well-known ‘du’, and provides a fast way to see what directories are using your disk space. One can install with the following apt command/apt-get command: sudo apt install ncdu For RHEL/CentOS, first enable EPEL repo (see CentOS 8 turn on EPEL repo and RHEL 8 enable epel repo) and type the following yum command: sudo […]

Running CI tests in Kubernetes through Github Actions

Example  name: Main action on: [push] jobs: build: runs-on: ubuntu-latest timeout-minutes: 5 steps: – uses: actions/[email protected] – name: install k8s run: | curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=777 sh – cat /etc/rancher/k3s/k3s.yaml mkdir -p ~/.kube cp /etc/rancher/k3s/k3s.yaml ~/.kube/config – name: example tests run: | kubectl cluster-info kubectl create deployment –image nginx my-nginx kubectl get po Source : https://odino.org/running-ci-tests-in-kubernetes-through-github-actions/

Deploy kubernetes cluster with multipass

multipass launch –name kms –cpus 1 –mem 1024M –disk 3G 16.04 multipass launch –name n1 –cpus 1 –mem 1024M –disk 3G 16.04 multipass launch –name n2 –cpus 1 –mem 1024M –disk 3G 16.04 multipass exec kms — /bin/bash -c “curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=”644″ sh -” multipass shell kms sudo cat /var/lib/rancher/k3s/server/node-token # copy the token and ip […]

1 2 3 33