- linux 13
- wsl 7
- k3s 4
- network 3
- python 3
- minikube 3
- k8s 2
- docker 2
- development 2
- testing 2
- wsl2 2
- edge 1
- observability 1
- nodejs 1
- powershell 1
- redis 1
- go 1
- jekyll 1
- selenium 1
- kong 1
- api 1
- surface pro x 1
- chrome 1
- webdriver 1
- vs code 1
- windows 1
- k3d 1
linux
Managing K3S cluster from remote
Provisioned a K3S cluster on a remote machine and try to manage it through the kubectl
cli command.
Accessing docker playground from remote
Looking for a solution similar to katacoda, which we can learn interactively. Came across this project which provides a ‘docker-in-docker’ enviornment to try things out. Follow through the document and bring up the application but I cannot access it in the browser using anything but ‘localhost’. From the log, I have noticed the following lines,
Installing pip packages from local
Installing packages behind firewall is troublesome, to say the least. Connectivity is always the culprit since explicit remote host access is never to be a once off exercise.
Setting up virtualenv
It won’t be the single post that talks about virtualenv since everytime I set this up, I forgot what I have done.
Running multiple minikube
Want to try something out but don’t want to mess up the minikube cluster I am using. Turns out there’s a way to run multiple of minikube on the same machine by passing in the -p
options. Example below,
Installing K3S with read access by non-root user
Installed K3S in Ubuntu but I need to sudo
for kubectl
command. Not ideal.
How do you define which user to start the terminal
I have installed Code Server according to this instruction. All goes well except the terminal is running as root.
Installing DB-less Kong API GW in Ubuntu 20.04
Kong provides APT repository to ease the installation but it would need the following files to start the service,
Run Selenium test using WebDriverIO in a cron job
I want to generate some traffic to my blog for analytic purpose. Wrote a selenium script using a headless Chrome Browser and WebdriverIO. All works well but it doesn’t work when I put it as a cron job.
Installing virtualenv in Ubuntu 20.04
I am following this article to install Virtualenv on my Lemur Pro. All goes well until I execute source ~/.bashrc
which prompts me with the following error,
Using X410 with WSL2
Getting X11 apps to work in WSL would require a XServer in Windows and X410 is what I am using.
DNS resolving issue in WSL2
My WSL instances failed to apt update
and stuck at “0% [working]”. Try to do a wget to the repo and realize the domain name failed to resolve.
Failed to ‘apt update’ in Ubuntu within WSL 2
One day when I boot up my Ubuntu instances in WSL and do the ‘apt update’, I am greeted with the following,
wsl
Resuming the minikube cluster
Work machine get restarted over the weekend and I realize the minikube cluster is not running.
Deverloping UI testing script in WSL2 using WebDriver
I want to use webdriver in my WSL2 environment and there are several challenges.
Accessing Docker container exposed port from host
I published ports from the docker container but when I try to access it from the host, it cannot be reached.
WSL2 cannot connect to the internet through LTE
Bringing back my Surface Pro X back to the office and want to hack something out through WSL2. Given it is my own machine and I cannot connect to the office Wi-Fi which I intend on my LTE for internet connectivity.
Using X410 with WSL2
Getting X11 apps to work in WSL would require a XServer in Windows and X410 is what I am using.
DNS resolving issue in WSL2
My WSL instances failed to apt update
and stuck at “0% [working]”. Try to do a wget to the repo and realize the domain name failed to resolve.
Failed to ‘apt update’ in Ubuntu within WSL 2
One day when I boot up my Ubuntu instances in WSL and do the ‘apt update’, I am greeted with the following,
k3s
Managing K3S cluster from remote
Provisioned a K3S cluster on a remote machine and try to manage it through the kubectl
cli command.
Accessing K3s From Wsl Host
I am trying out something with k3d and want to access from the external host. The key to make this happen is to publish the ports needed when I create the cluster.
Installing K3S with read access by non-root user
Installed K3S in Ubuntu but I need to sudo
for kubectl
command. Not ideal.
K3S Experiment
Edge cluster is a topic I would like to explore. I am leveraging some free services I found to conduct my experiment.
network
Checking site accessibility using Powershell
There’s a need to determine certain web site accessibility from a Windows desktop sitting behind a firewall. “Telnet” is the first tool to consider but we want to automate the process as the test would be conducted across a number of PC but scripting around the Telnet command is not pleasant to say the least.
Accessing Docker container exposed port from host
I published ports from the docker container but when I try to access it from the host, it cannot be reached.
WSL2 cannot connect to the internet through LTE
Bringing back my Surface Pro X back to the office and want to hack something out through WSL2. Given it is my own machine and I cannot connect to the office Wi-Fi which I intend on my LTE for internet connectivity.
python
Installing pip packages from local
Installing packages behind firewall is troublesome, to say the least. Connectivity is always the culprit since explicit remote host access is never to be a once off exercise.
Setting up virtualenv
It won’t be the single post that talks about virtualenv since everytime I set this up, I forgot what I have done.
Installing virtualenv in Ubuntu 20.04
I am following this article to install Virtualenv on my Lemur Pro. All goes well until I execute source ~/.bashrc
which prompts me with the following error,
minikube
Running multiple minikube
Want to try something out but don’t want to mess up the minikube cluster I am using. Turns out there’s a way to run multiple of minikube on the same machine by passing in the -p
options. Example below,
Resuming the minikube cluster
Work machine get restarted over the weekend and I realize the minikube cluster is not running.
Set the default container engine in minikube
Minikube supports to run on different virtualization engine, such as docker or podman. We can define it in the runtime as argument, or we can put it into configuration file located in
k8s
K3S Experiment
Edge cluster is a topic I would like to explore. I am leveraging some free services I found to conduct my experiment.
Using custom Kubernetes Cluster in Codefresh
- Give full permission to default account
docker
Accessing docker playground from remote
Looking for a solution similar to katacoda, which we can learn interactively. Came across this project which provides a ‘docker-in-docker’ enviornment to try things out. Follow through the document and bring up the application but I cannot access it in the browser using anything but ‘localhost’. From the log, I have noticed the following lines,
Using REDIS container image and assign it with a password
By default, the Docker image provided by REDIS is having no authentication password. To secure the access, we need to either pack our container image together with a configuration file or volume mount where the configuration file resides.
development
Getting elements in Webdriver using both XPath and CSS Selector
Writing a test to randomly click on any link on my webpage and all entries are wrapped within a particular CSS class named ‘button white’.
Deverloping UI testing script in WSL2 using WebDriver
I want to use webdriver in my WSL2 environment and there are several challenges.
testing
Getting elements in Webdriver using both XPath and CSS Selector
Writing a test to randomly click on any link on my webpage and all entries are wrapped within a particular CSS class named ‘button white’.
Deverloping UI testing script in WSL2 using WebDriver
I want to use webdriver in my WSL2 environment and there are several challenges.
wsl2
Accessing K3s From Wsl Host
I am trying out something with k3d and want to access from the external host. The key to make this happen is to publish the ports needed when I create the cluster.
Headless Chrome Webdriver Surface Pro X
When I try to execute a WebDriver-IO script in my Surface Pro X with the use of headless Chrome, I encounter the following exception,
edge
K3S Experiment
Edge cluster is a topic I would like to explore. I am leveraging some free services I found to conduct my experiment.
observability
Monitor NodeJS app with New Relic
I would like to add observability to the demo app Let’s Chat. It is written in NodeJS and I am following this page to add the agent needed.
- Modify package.json and add
"newrelic": "latest",
according to the alphabatical orders. - Modify app.js and add
require('newrelic');
at the beginning of the file. In my case, I put it in front of the linerequire('colors');
nodejs
Monitor NodeJS app with New Relic
I would like to add observability to the demo app Let’s Chat. It is written in NodeJS and I am following this page to add the agent needed.
- Modify package.json and add
"newrelic": "latest",
according to the alphabatical orders. - Modify app.js and add
require('newrelic');
at the beginning of the file. In my case, I put it in front of the linerequire('colors');
powershell
Checking site accessibility using Powershell
There’s a need to determine certain web site accessibility from a Windows desktop sitting behind a firewall. “Telnet” is the first tool to consider but we want to automate the process as the test would be conducted across a number of PC but scripting around the Telnet command is not pleasant to say the least.
redis
Using REDIS container image and assign it with a password
By default, the Docker image provided by REDIS is having no authentication password. To secure the access, we need to either pack our container image together with a configuration file or volume mount where the configuration file resides.
go
Passing environment variable to GO application in startup
Sometimes, we want to pass attribute values as environment variable, either for security reason (like password) or to ease the deployment across envrionment.
jekyll
Add pagination to Jekyll site
I have been using Jekyll to write my blog for quite sometime. The “so-simple-theme” takes care of all the layout and today, I try to add pagination to my site since I have enough entries now.
selenium
Run Selenium test using WebDriverIO in a cron job
I want to generate some traffic to my blog for analytic purpose. Wrote a selenium script using a headless Chrome Browser and WebdriverIO. All works well but it doesn’t work when I put it as a cron job.
kong
Installing DB-less Kong API GW in Ubuntu 20.04
Kong provides APT repository to ease the installation but it would need the following files to start the service,
api
Installing DB-less Kong API GW in Ubuntu 20.04
Kong provides APT repository to ease the installation but it would need the following files to start the service,
surface pro x
Headless Chrome Webdriver Surface Pro X
When I try to execute a WebDriver-IO script in my Surface Pro X with the use of headless Chrome, I encounter the following exception,
chrome
Headless Chrome Webdriver Surface Pro X
When I try to execute a WebDriver-IO script in my Surface Pro X with the use of headless Chrome, I encounter the following exception,
webdriver
Headless Chrome Webdriver Surface Pro X
When I try to execute a WebDriver-IO script in my Surface Pro X with the use of headless Chrome, I encounter the following exception,
vs code
How do you define which user to start the terminal
I have installed Code Server according to this instruction. All goes well except the terminal is running as root.
windows
Pairing bluetooth keyboard with a PIN
For some reason, the bluetooth adaptor failed to work on my Windows machine. Get it back by updating the drivers. Now my keyboard that was paired before is not recognized and when I try to pair, Windows keep prompting me for a PIN which I don’t have (it pops up once but I don’t get the chance to write it down).
k3d
Accessing K3s From Wsl Host
I am trying out something with k3d and want to access from the external host. The key to make this happen is to publish the ports needed when I create the cluster.