Archives de l’auteur : davidhxxx

Kubernetes resources deployments

Table of matters Kind : Deployment The definitions Select the node for the pod deployment imagePullPolicy Kind : Ingress The definitions Example Deploy a resource Deploy or update a resource When a deployment is updated by the apply subcommand? Restart, delete permanently … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Docker storage

Mount overview – Volumes (the recommended way) are stored in the host filesystem which is managed by Docker (/var/lib/docker/volumes/ on Linux). Non-Docker processes should not modify this part of the filesystem. – Bind mounts may be stored anywhere on the … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Linux administration

GLOBAL ENVIRONMENT * Environment variables file for all users : /etc/environment * scripts to run at startup for the shell of any user : /etc/profile.d/*.sh PROFILE * Reload bashrc : source ~/.bashrc OR . ~/.bashrc History Show command history of … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

jar commands

Execute a jar (with common args): java -jar -cp /foo:/foo/bar/* -D… -X… myApp.jar appArg1=foo appArg2=bar Create a jar (create, output jar file) in the current directory: jar cf app.jar input-file(s) Extract a jar (extract, verbose, input jar file) in the … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Docker diagnostic commands

Docker system command Get real time events of the Docker server : docker system events Helpful flags : –since string : show all events created since timestamp –until string : stream events until this timestamp Show docker disk usage (for … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Kubeadm and Kubectl commands

Common Set the log level verbosity : : -v NUMBER Example : kubeadm -v 10 init Kubeadm Init a cluster (done on a node designed to be master) : kubeadm init –pod-network-cidr=NETWORK_IP_START_RANGE : Example : kubeadm init –pod-network-cidr=192.168.0.0/16 Join a cluster … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

package manager for Linux

Overview apt/apt-get debian based distro yum : redhat/centos/fedora distro apk : alpine (light Docker images) snap : universal linux package manager and so with low coupling with distros, so updated more frequently Snap How to install Snap ? Debian based … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

OpenSSL

View details of a certificate (.crt file) : openssl x509 -in /mypath/ca.crt -noout -text Same thing but for cert request : openssl req -in CSR.csr -text Convert a crt to pem : Officially : openssl x509 -in mycert.crt -out mycert.pem … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Elastic Rest API

Query types match vs terms : match performs full-text analysis and doesn’t search exact match VS terms performs exact term search In query : To perform full-text search on foo_field, we refer to foo_field To perform keyword search and aggregations … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Linux Bash Script to install and uninstall a JAR

#!/bin/bash   psLine=$(ps aux | grep ‘[j]ava -jar.*demo-.*.jar.*’) # -n not empty, z empty if [ -n "$psLine" ] ; then currentPid=$(echo $psLine | awk ‘{print $2}’) echo Current appli running detected with pid=$currentPid printf "First, we stop the current … Continuer la lecture

Publié dans Non classé | Laisser un commentaire