Zero Downtime Rolling Update K8s

The software world is evolving faster than ever, and the need to stay competitive requires new software releases as quickly as possible, without impacting users online. Many enterprises have migrated their workloads to Kubernetes clusters, which inherently take into account some production environment practices, but there are some additional things we need to do to make Kubernetes truly zero downtime without disruption or lost requests. Rolling Updates By default, Kubernetes Deployment has a rolling update policy for Pod updates, which ensures that some instances are still running when the application is updated at any point in time to prevent the application from going down, and only kills the old Pod when the newly deployed Pod is up and ready to handle traffic.

Using the GitHub CLI Command Line Tools

Since GitHub was acquired by GiantSoft, it has released a number of very useful developer tools, such as the CI/CD tools we used earlier GitHub Actions and Package packages, and today we’re going to introduce you to another useful tool that GitHub has recently released: the GitHub CLI, which allows developers to It allows developers to work seamlessly with GitHub from the command line, which means that we can pull

RESTful API Design Guide

What is RESTful API? REST: The full name is Resource Representational State Transfer, or Representational Layer State Transfer. Look at the concept, I guess no one can understand. Explain in a human word: URL to locate resources, using HTTP verbs (GET, POST, PUT, DELETE) to describe the operation. Resources A “resource” is an entity on the Web, or a specific piece of information on the Web. It can be a piece of text, a picture, a song, a service, in short, a concrete reality.

With high hopes for Serverless, have the controversies and issues been resolved?

In 2009, the University of California, Berkeley published a paper, “The Berkeley View on Cloud Computing,” which correctly predicted the evolution and popularity of cloud computing over the next decade. In 2019, Berkeley published another paper with the same naming style, “A Berkeley View on Serverless Computing,” which again predicted that “serverless computing will evolve to become the dominant form of cloud computing in the future. Serverless has been met with high hopes, but also with some controversy.

NET 6 What's New -- High Performance Logging

If you mention logging in .NET, you will definitely think of ILogger, which is a common way to provide logging in .NET. The following code is the code for the initialization of the .NET Core WebAPI project, which uses ILogger to provide logging Logging. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 private readonly ILogger<WeatherForecastController> _logger; public WeatherForecastController(ILogger<WeatherForecastController> logger) { _logger =

How to Install an HTTP Git Server on Debian 11 Using Nginx

Git is an open source version control system used by thousands of developers around the world to track your software changes at the source code level. It allows you to track changes, revert them to a previous stage and create alternate versions of files and directories. HTTP Git Server is an open source project that uses an Nginx web server to serve Git repositories over a local area network (LAN). It’s simple and easy to set up, and anyone can manage it from a command-line interface.

Modify the GPG UID name

The previous GPG UID name was Scvoet, which is my username. Some time ago, I changed the nickname of each platform to my English name Percy, and today I changed the UID name of GPG to my English name as well. The information returned by the command has been trimmed down to remove most of the unnecessary confirmation and key list display. Open the command line tool and enter the email address associated with the UID.

Configure GPG keys for IDEA/Git and light up the GitHub Verified Commit logo

Preface Setting up a GPG key for Git will confirm the password you configured each time you commit, and display a Verified flag in GitHub’s Commit to mark that the commit was actually done by you, and not by someone else. Tutorials System Environment OS version: Windows 10 X64 IDE used: Intellij IDEA Installation Click here to download and install GPG Tools, follow the instructions in the image below to download the installer

Using DropBox as a Private Git Repository

I. Preface I’ve been working on some small projects that I can’t easily make public on GitHub, but I wanted to have a simple private repository. So I came up with DropBox. However, we couldn’t simply put the project in the DropBox directory, because that would cause every simple save to initiate a file sync, and some temporary file changes during compilation would cause the DropBox to sync, which would drive the CPU usage of the computer very high.

Deploying Spinnaker on Kubernetes

Spinnaker is a continuous delivery platform, originally developed by Netflix, for releasing software changes quickly and reliably. Spinnaker makes it easier for developers to focus on writing code without worrying about the underlying cloud infrastructure, and it integrates seamlessly with Jenkins It integrates seamlessly with Jenkins and other popular build tools. I’ve been wanting to try Spinnaker for a long time, but I’ve tried many times without success due to

Deploying Vault on Kubernetes

Many times we may directly expose private information such as application passwords or API Token in the source code, which is obviously not a good way to expose such private information. The Kubernetes system provides a Secret object to store private data, but it is only a simple Base64 encoding, which is better than exposing it directly, but it is still not enough to use Secret directly for applications with

Golang's approach to comparing two structs of the same type and its performance

You can use reflect.DeepEqual and cmp.Equal to compare two structs of the same type to see if they are equal, or you can use hard-coded comparisons, see below how they perform. Define a struct with multiple data types, e.g. 1 2 3 4 5 6 type T struct { X int Y string Z []int M map[string]string } reflect.DeepEqual This is a built-in function 1 reflect.DeepEqual(t2, t1) cmp.Equal Import library github.

Get the real access IP of the client

Normally, when a client in the cluster connects to the service, the Pod supporting the service can get the IP address of the client, but when the connection is received through the node port, the source IP address of the packet will change because of the Source Network Address Translation (SNAT) performed on the packet, and the Pod on the backend cannot see the actual client IP, which is a problem for some applications, for example, the request log of nginx cannot get the exact IP of the client access.

Network Communication Protocol - QUIC

If you have an app, you can increase access speed by more than 15% without any modification. Especially when the network is weak, it can improve access speed by more than 20%. If your App, with frequent switching between 4G and WIFI networks, does not disconnect, does not require reconnection, and has no user perception. If you have an App that needs the security of TLS but also wants the power of HTTP2 multiplexing.

Gitlab pulling code exception after updating Git version:The authenticity of host xxx can't be established

After installing the latest version of the Git client (git version, the following error is reported when pulling code from gitlab: 1 2 3 4 5 6 7 8 9 10 11 $ git pull -r -v The authenticity of host ‘[]:10022 ([]:10022)’ can’t be established. ED25519 key fingerprint is SHA256:K+/XdcpPLPqHJsmSIsXHUMIrRVxivN9//YiYFp7VQeM. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added ‘[gitlab.

Describing Kubernetes Applications Using Programming Languages - cdk8s

cdk8s is a new framework released by AWS Labs written in TypeScript that allows us to define resource lists for Kubernetes using a number of object-oriented programming languages. cdk8s also ends up generating native Kubernetes YAML files, so we can use cdk8s to define running Kubernetes application resources from anywhere. Introduction The concept of constructs is provided in cdk8s, and they are abstractions of Kubernetes resource objects (Deployment, Service, Ingress,

Dockerfile Best Practices for Accelerating the Development Process

A Dockerfile is the starting point for creating a Docker image, which provides a well-defined set of instructions that allow us to copy files or folders, run commands, set environment variables, and perform other tasks needed to create a container image. It is important to write Dockerfile to ensure that the generated images are safe, small, fast to build and fast to update. In this article we’ll see how to write good Dockerfiles to speed up the development process, ensure build reusability, and generate images that are safe to deploy to production.

Visually Create Kubernetes Microservice Applications

Just found an awesome looking tool: icepanel that can be used to quickly create and visualize our Kubernetes microservice applications. It’s also very easy to use, you just need to install a VSCODE plugin. Search for the plugin IcePanel in VSCODE and install it. Create a new empty workspace and in the bottom left corner you will see an Open IcePanel button, clicking on it will prompt us if we want to install the icepanel.

Build remote development environments with PyCharm, Okteto and Kubernetes

Okteto is an application development tool for developing and testing code in Kubernetes. It is very easy to launch a development environment in Kubernetes with one click through Okteto. We have also introduced the Skaffold tool from Google, and today we will demonstrate how to use Okteto to build Python application development environment. Installation We just need to install the Okteto CLI tool on our local development machine. To use Okteto to configure the environment we need to have access to a Kubernetes cluster on our local machine, so The prerequisite is to configure a kubeconfig file for an accessible Kubernetes cluster.

Understanding HTTPS principles, SSL/TLS protocols in detail

Introduction to SSL/TLS When we use the HTTP protocol, the data transmitted is insecure, because all data going to and from the client and the server is in plaintext:. Third parties can get access to the real data Third parties can tamper with the data Third parties can impersonate the server or client The full name of HTTPS is Hypertext Transfer Protocol Secure, which is used to exchange information securely (secure communication) between two end systems on a computer network, which is equivalent to adding a Secure secure word eye to HTTP, then we can give a HTTPS definition: HTTPS is a protocol and specification for secure transmission of text, images, audio, video and other hypertext data between two points in the computer world.