Your cart is currently empty!
Category: Uncategorized
K3s: Cert Manager
Install cert-manager #1. Add Helm repository. #2. Update Helm repository. #3. (Option 1) Install Cert Manager CRD. At this moment, the latest version is v1.9.1. Click here to get the latest release. #4. (Option 2) Install Cert Manager via Helm. At this moment, the latest version is v1.9.1. Click here to get the latest release.…
K3s: Kubeconfig
K3s Kubernetes config file is located at: Kubernetes third-party applications will check the config file at: To make life easier, we link /etc/rancher/k3s/k3s.yaml to $HOME/.kube/config. References:
Kubernetes: Ingress
Ingress in one of the ways to expose HTTP and HTTPS routes of your internal services. Single rule: Multiple rules: This will froward /index.html, /about.html to svc1 and /some-dir/index.html, /some-dir/others.html to svc2. References:
Docker: Logs Output
Docker only logs STDOUT and STDERR from PID 1. Sending stuff to STDOUT and STDERR of PID n:
MySQL: Too Many Connections Error
Check status: Check config: Default max_connections config is 151. Check current process list: By the end of the line you will get the total connections. Set new max_connection value: References: MySQL – SHOW VARIABLES Statement (tutorialspoint.com) MySQL – SET Syntax for Variable Assignment (tutorialspoint.com)
Golang: String Format
%% prints a single % %b binary integer %c a character represented by the corresponding Unicode code point %d decimal integer %e scientific notation (mantissa/exponent), lowercase %E scientific notation (mantissa/exponent), uppercase %f decimal floating point, lowercase %F decimal floating point, uppercase %g the shortest representation of %e or %f %G the shortest representation of %E…
Kubernetes: Headless Service and Endpoints
Say you have Kubernetes node on 192.168.1.10 and a database node on 192.168.1.11. First, we create a dummy service: When you create a service you will also get an endpoint: To get my-db to point to 192.168.1.11. First, we need to edit the endpoint to point to 192.168.1.11. Add these lines to the end of…
Golang: Append via Function Receiver
Create new type that holds slice of user struct. Create function receiver for our new type. In our main function we can use it to add user struct to the slice.