Archives de l’auteur : davidhxxx

Kubernetes : Daemonset

What is a DaemonSet ? A DaemonSet is a resource that ensures that all (or some) Nodes run a copy of a Pod. As nodes are added to the cluster, Pods are added to them. As nodes are removed from … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Calico and Kubernetes

yml manifest or operator ? Operator is a specific program dedicated to calico lifecyle management in k8s yml manifest is the « old » way. It relies on deploying the calico resources on kubernetes via kubctl and a k8s yml. yml manifest … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Kubernetes Resources management

Node Allocatable The general idea : Node Capacity ————————— | kube-reserved | |————————-| | system-reserved | |————————-| | eviction-threshold | |————————-| | | | allocatable | | (available for pods) | | | | | Node resource information : – … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Thread-safety in Python

queue module – A synchronized queue class queue module overview It implements multi-producer, multi-consumer queues. It is useful when information must be exchanged safely between multiple threads. The Queue class in this module implements all the required locking semantics. The … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Logging with Python

Import import logging Basic configuration for the logging system logging.basicConfig() Practical for simple scripts to do one-shot configuration of the logging package. The default behaviour is to create a StreamHandler which writes to sys.stderr, set a formatter using the BASIC_FORMAT … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Reflection built-in functions and Inspect module in python

Reflection built-in functions Return the type of an object: def type(object) The return value is a type object and generally the same object as returned by object.__class__: Get the attribute value by its name from an object: getattr(x, ‘y’) is … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

date, time and datetime in Python

Module presentation Basic types Aware and Naive instances Create date, time and datetime Create a datetime from a timestamp Date formatting Date computation Date comparison date, time and datetime Modules datetime module : classes for manipulating dates and times. dateutil … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Traceback module in python

General It provides a standard interface to extract, format and print stack traces of Python programs. It mimics the behavior of the Python interpreter when it prints a stack trace. The module uses traceback objects (of type types.TracebackType), which are … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

faulthandler and sys hook in python

faulthandler module : Dump the Python traceback General Content: functions to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal. Signals/Faults handled: SIGSEGV, SIGFPE, SIGABRT, SIGBUS, SIGILL Warning: The fault handler is called on … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

aws load balancer presentation

Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group Elastic Load Balancing types – Application Load Balancer – Network Load Balancer – Gateway Load Balancer – Classic Load Balancer Which usages? Application Load Balancer: … Continuer la lecture

Publié dans Non classé | Laisser un commentaire