Google Kubernetes Engine Node Pools

In Google Kubernetes Engine, Nodes are Google Complete Engine (Virtual Machiens). Pods run inside Nodes. A Kubernetes cluster can contain multiple node pools. A node pool contain multiple nodes of same instance type. To create a Node Pool in Google Kubernetes Engine, run

To delete a node pool, run

To resize a node […]

Read More…

Kubernetes scale a deployment

To scale a deploymenet in Kubernetes using kubectl, run

Example

See Kubernetes […]

Read More…

Google Kubernetes Engine get credentials

Before you can run kubectl commands on Google Kubernetes Engine, you need to get credentials, this is done with command

To use gcloud commands, you need to login to google cloud first using command

See Google Kubernetes Engine […]

Read More…

Codeigniter 3 session not working

On a web application, session not working. I verified PHP session is working with script https://gist.github.com/serverok/8c504205ae0357e0c6488eab880a77bf When refreshing the script, the number start increasing, that confirms PHP session works fine on the server. As for Codeigniter, we need to check the session settings in file application/config/config.php

That looks good. Session will be saved in […]

Read More…

Whitelist an IP address in imunify360

To white list an IP address in imunify360 firewall, you can run command

Another way to white list IP is create a folder

Inside the folder, create a file with .txt extension, add IPs you need whitelist in CIDR format, one per line. Reoad firewall with command

See imunify360 […]

Read More…

install php redis extension in aaPanel

redis php extension aapanel

To install php redis extension on aaPanel control panel, run

If you get php-config not found error, you need to create a symlink. This is for server with PHP 7.4 installed, if your server have differnt version of PHP, you may need to change path.

Now continue the installation from “./configure” command, it […]

Read More…

React Application showing 404 error on refresh

On Apache server, React Application works fine, but if you refresh a page, it shows 404 error. This is because the application use BrowserRouter. To fix the error, create a .htaccess file with following content

Put this on the folder where your application index.html is or in Apache Virtual Host entry. See htaccess […]

Read More…

Change SSH port in CyberPanel

CyberPanel Change SSH port

CyberPanel is a free open source control panel for web hosting. It use OpenLiteSpeed web server. You have the option to use Commercial LiteSpeed web server with CyberPanel. To change SSH port on CyberPanel server, login to CyberPanel, then go to

From the left side menu. On next page, you will get option to […]

Read More…

Amazon Elastic Container Registry

amazon docker registry (ECR)

Amazon Elastic Container Registry is used to store docker images in Amazon AWS cloud. To create a repository using awscli command line tool, run

In Amazon AWS console, you can see the newly created repository by going to “Elastic Container Registry” page in the region where you created the repository. https://ap-southeast-1.console.aws.amazon.com/ecr/repositories?region=ap-southeast-1 To see the […]

Read More…