1602315617
In my previous post, I wrote a go application that displays the GPS location of any IP address. Here in this post, I’ll explain how to deploy the same in minikube.
If you are new to kubernetes and want to learn, I recommend this youtube playlist.
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
_if you don’t have minikube installed in your laptop, you can do it by following the instructions _here.
desired deployment state
I’m going to list down 7 steps I did to get to the above shown desired state. I hope you can replicate what I did very easily in your own minikube environment.
minikube start
you should receive an output like this
MacBook-Pro-2:Desktop jeshocarmel$ minikube start
😄 minikube v1.12.3 on Darwin 10.14.3
✨ Using the hyperkit driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🏃 Updating the running hyperkit "minikube" VM ...
🐳 Preparing Kubernetes v1.18.3 on Docker 19.03.12 ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: default-storageclass, storage-provisioner
🏄 Done! kubectl is now configured to use "minikube"
To ensure minikube has started successfully, run the command below
minikube status
and you should receive an output like this.
#kubernetes #redis #golang #containers #minikube
1596679140
Redis offers two mechanisms for handling transactions – MULTI/EXEC based transactions and Lua scripts evaluation. Redis Lua scripting is the recommended approach and is fairly popular in usage.
Our Redis™ customers who have Lua scripts deployed often report this error – “BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE”. In this post, we will explain the Redis transactional property of scripts, what this error is about, and why we must be extra careful about it on Sentinel-managed systems that can failover.
Redis “transactions” aren’t really transactions as understood conventionally – in case of errors, there is no rollback of writes made by the script.
“Atomicity” of Redis scripts is guaranteed in the following manner:
It is highly recommended that the script complete within a time limit. Redis enforces this in a weak manner with the ‘lua-time-limit’ value. This is the maximum allowed time (in ms) that the script is allowed to run. The default value is 5 seconds. This is a really long time for CPU-bound activity (scripts have limited access and can’t run commands that access the disk).
However, the script is not killed when it executes beyond this time. Redis starts accepting client commands again, but responds to them with a BUSY error.
If you must kill the script at this point, there are two options available:
It is usually better to just wait for the script to complete its operation. The complete information on methods to kill the script execution and related behavior are available in the documentation.
#cloud #database #developer #high availability #howto #redis #scalegrid #lua-time-limit #redis diagram #redis master #redis scripts #redis sentinel #redis servers #redis transactions #sentinel-managed #server failures
1602315617
In my previous post, I wrote a go application that displays the GPS location of any IP address. Here in this post, I’ll explain how to deploy the same in minikube.
If you are new to kubernetes and want to learn, I recommend this youtube playlist.
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
_if you don’t have minikube installed in your laptop, you can do it by following the instructions _here.
desired deployment state
I’m going to list down 7 steps I did to get to the above shown desired state. I hope you can replicate what I did very easily in your own minikube environment.
minikube start
you should receive an output like this
MacBook-Pro-2:Desktop jeshocarmel$ minikube start
😄 minikube v1.12.3 on Darwin 10.14.3
✨ Using the hyperkit driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🏃 Updating the running hyperkit "minikube" VM ...
🐳 Preparing Kubernetes v1.18.3 on Docker 19.03.12 ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: default-storageclass, storage-provisioner
🏄 Done! kubectl is now configured to use "minikube"
To ensure minikube has started successfully, run the command below
minikube status
and you should receive an output like this.
#kubernetes #redis #golang #containers #minikube
1599854400
Go announced Go 1.15 version on 11 Aug 2020. Highlighted updates and features include Substantial improvements to the Go linker, Improved allocation for small objects at high core counts, X.509 CommonName deprecation, GOPROXY supports skipping proxies that return errors, New embedded tzdata package, Several Core Library improvements and more.
As Go promise for maintaining backward compatibility. After upgrading to the latest Go 1.15 version, almost all existing Golang applications or programs continue to compile and run as older Golang version.
#go #golang #go 1.15 #go features #go improvement #go package #go new features
1590207561
How to Deploy a Resilient Go Application to Kubernetes on DigitalOcean
Subscribe to the channel https://www.youtube.com/watch?v=g_-U5jddSuM
#deploy #application #go #kubernetes #digitalocean
1589642250
In microservice architectures, it is fairly common to have a project that includes different worker types. A Makefile can be used to manage the creation of multiple programs, but the Go toolchain has a great tool that can be used as well, go generate. Here are some examples of how we take advantage of ‘go generate’ at Nuvi:
In other words, we have one git repository, but from that code, we want to generate ‘n‘ number of executables.
#golang #programming #tutorial #ci/cd #deployment #go #go generate #toolchain