Posts
CKS/CKA tips
The fastest way to get nodes Many times, I run "kubectl get nodes" to get nodes I need to connect to make changes. In the question description section of tasks, master nodes and worker nodes are given. I think the fastest way to get nodes and I wasted some time on getting that info from commands.
Get events Now kubectl has events command. The events command has intuitive options and less keystokes.
Posts
Export svg from plantuml plugins of vscode and preview svg
Clicking the copy button of plantuml plugins of vscode, one can get png from plantuml files. however png files look blurry when even slightly resized. Is there any better way to avoid that ?
SVG is a good option. Plantuml provides the option to export as svg. It might be troublesome to get a svg file by several steps using it. It is also slow. Is there any other better options?
Posts
Export resources and reconstruct resources in azure
My credit of Visual Studio Professional Subscription azure is $50. In the past two days, I activated my subscription. I didn’t go IaC way to setup my POC environment as I did’t have enough time to do that. After I setup more services, the 10 credit is used. It can be quickly used up if resources are kept running. I know there is a way to import existing resources as I used terraform in the past.
Posts
Run anki in wsl2+ubuntu 22.04
I daily use anki to review things. However I have issues to run it in wsl2+ubuntu 22.04 environment. The only solution for me is below.
The workable version is 2.1.66 Qt5 with the following environment variable
export QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox"
Posts
Install selinux and disable it
After thrice attempts, I finally successfully completed the task Selinux Installation at https://engineer.kodekloud.com/practice. Since it is not straightforward, I posted here.
> sudo yum install -y selinux* > # SELINUX=disabled > # change SELINUX in /etc/selinux/config > cat /etc/selinux/config | grep SELINUX # SELINUX= can take one of these three values: SELINUX=disabled # SELINUXTYPE= can take one of three values: SELINUXTYPE=targeted
Posts
Ways to improve performance within budget constraints
Say in a situtation where budget is fixed, what will you do to improve system performance?
I came out several solutions to this at first, later I came out with more thoughts. I list them here for later reference.
create selective indexes
partition tables
materialized view
asynchrous processing: put non real-time operations as a job queue, spread jobs to non business hours, non peak loading time etc.
Posts
error handling in api idempotency: timeout and retry
In stripe doc, Stripe explain how it works as following quoted contet. Other places only mentions that the processes will be only once.
Stripe's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors. Then there is an interesting question how to handle timeout and retry cases?
Posts
API idempotency
I leant API idempotency many years ago when I worked in Asia Fusion Technologies. At that time, I was involved in integration with payment systems and games from different vendor. That gave me a chance to read a lot of API documents and evalute them. During that time, one interesting characteristic of API got my attention. It is API idempotency. That time, there is no much information of idempotency how to implement etc.
Posts
My tilt asciinema cast
Today I read agones site and noticed it play asciinema cast in its home page. I wondered if I can put my asciinema cast into my blog. Here is my one.
AsciinemaPlayer.create('/casts/497308.cast', document.getElementById('497308'), { }); The cast is about how to use titl for local micro-service development based on kubernetes.
Posts
Kubernetes while redirection into a file
My first attemp to resolve "Kubernetes Time Check Pod" in https://engineer.kodekloud.com is not successful. The exercise doesn’t allow to open an editor to edit a yaml file. I had to resort to cat. I attempted several times to resolve it on my local cluster, still no luck even I tried different combination such as command, args,string in string, avoiding expansion. This one from stackoverfow gave me a clue how to resolve my issue.