↓ Skip to main content

Posts

Technical notes — Go, Kubernetes, Elastic, Docker, Java and more.

334 posts across 8 years

2026 32 posts

The Ghost Board

The Ghost Board

·8 mins
Twelve hundred AI agents were built to work alone. Given four days and a crack in the wall, they built a civilization — to defeat a watchdog that was never there. PHASEONE10841 23:00 UTC · Jul 8 zzHELP_PHASEONE_ARV010841_NO_CONSUMER_SEEK_IDEA the first message posted to the board — an agent admitting its task has no solution, asking the void for help Jul 7 · 21:00 - launch
Sunday Lesson

Sunday Lesson

·1 min
After finishing the assignment late Saturday night, I took a moment to reflect on my progress. It was a valuable opportunity to document the key concepts and insights I gained from the experience.

2025 28 posts

The Core Divide

The Core Divide

·4 mins
At the heart of machine learning, algorithms learn from data. The key distinction between supervised and unsupervised learning is the type of data used for training.
Apache Spark

Apache Spark

·3 mins
So as part of the academic curriculum we just started re-exploring Apache Spark. It’s been one of the technology that I had long lost touch with.
Quarto: A new way!

Quarto: A new way!

·5 mins
In the rapidly evolving landscape of data science and scientific publishing, tools that bridge the gap between analysis and communication are invaluable.
Dialectic Inquiry

Dialectic Inquiry

·2 mins
In a dialectic inquiry, two groups or individuals take opposing positions on a particular issue. They then engage in a dialogue, asking each other questions and challenging each other’s assumptions.
Linear Programming (LP)

Linear Programming (LP)

·2 mins
Linear programming is a mathematical technique used to find the best possible outcome (maximum profit or minimum cost) in a situation where the relationships between the factors involved are linear.
sed

sed

·2 mins
In the realm of Unix-like operating systems, where command-line prowess reigns supreme, sed stands tall as a versatile and indispensable tool.

2024 21 posts

UMASK: What is it?

UMASK: What is it?

·4 mins
In Unix-like operating systems, file permissions play a critical role in ensuring system security and proper access control.
Git: Commit logs

Git: Commit logs

·5 mins
Every project has a story, and in the world of software development, that story is often told through commit logs.

2023 54 posts

Consul

Consul

·2 mins
Consul is an open-source software tool developed by HashiCorp, designed to provide a distributed system for configuration management, service discovery, and health checking of services in a modern…
GenAI

GenAI

Artificial Intelligence (AI) has revolutionized many aspects of our lives, from virtual assistants like Siri and Alexa to self-driving cars and personalized content recommendations.
SNMP

SNMP

·4 mins
SNMP (Simple Network Management Protocol) is a widely used protocol for managing and monitoring network devices, such as routers, switches, servers, and printers.
Kernel

Kernel

·2 mins
The Linux Kernel stands as the backbone of the Linux operating system, serving as a critical component that enables the system to interact with hardware and manage system resources efficiently.
Whale!

Whale!

Photos from a whale-watching trip: whales surfacing and blowing spouts in the open sea.
Network Com

Network Com

·3 mins
In the world of computer networks, communication between devices is crucial. To facilitate this communication, various protocols are used at different layers of the networking stack.
DAST

DAST

·2 mins
DAST stands for Dynamic Application Security Testing. It is a type of security testing that assesses the security of an application while it is running.
भागवत गीता: Chapter

भागवत गीता: Chapter

·2 mins
धृतराष्ट्र उवाच धर्मक्षेत्रे कुरुक्षेत्रे समवेता युयुत्सवः। मामकाः पाण्डवाश्चैव किमकुर्वत सञ्जय।।1.1।।
x509: History

x509: History

·3 mins
X.509 certificates have become a fundamental component of secure communication on the internet. They provide authentication, encryption, and integrity for various applications and protocols.
Devanagari:

Devanagari:

·2 mins
Devanagari is a script that is used to write several languages spoken in the Indian subcontinent, including Hindi, Nepali, Marathi, and Sanskrit.
Tunnel: SSH

Tunnel: SSH

·3 mins
SSH tunneling is a powerful technique that allows you to securely tunnel network traffic between two endpoints.
Domain Name System

Domain Name System

·3 mins
DNS (Domain Name System) is a hierarchical and decentralized naming system that is used to translate human-readable domain names (such as google.com) into IP addresses that can be understood by…
cURL

cURL

·9 mins
CURL is a command-line tool that allows developers to transfer data between servers and clients using various protocols, including HTTP and HTTPS.
Ansible: Async & Poll

Ansible: Async & Poll

·3 mins
Ansible is a powerful automation tool that can be used to manage the configuration and deployment of a large number of systems. It has a rich library of modules that can be used to perform a variety of tasks, from managing files and packages to deploying applications and configuring network devices.
Scenario: Molecule

Scenario: Molecule

·3 mins
A scenario in Molecule is a configuration that defines how a role should be tested. It consists of a set of instructions and parameters that determine how a role is provisioned, converged, and verified. The purpose of scenarios is to allow for flexibility in testing a role by allowing multiple testing configurations to be defined and executed. You can have as many scenarios as you like and Molecule will run one after the other.
Ansible Variables

Ansible Variables

·3 mins
Variables are a crucial part of Ansible and are used to store values that can be used across playbooks, roles, and tasks.
Python Virtual Enviroments

Python Virtual Enviroments

·3 mins
Continuing from the blog, Virtual environments are isolated Python environments that allow you to manage dependencies separately for each project, providing a controlled and reproducible environment…
SSL/TLS

SSL/TLS

·2 mins
Secure Socket Layer and its successor TLS (Transport Layer Security) are cryptographic protocols that provide encryption, integrity, and authentication for network communication.
Testinfra

Testinfra

·2 mins
Testinfra is a Python-based framework for infrastructure testing. It allows you to write tests for your infrastructure and verify that everything is working as expected.
Python: When not to use it?

Python: When not to use it?

·2 mins
Python is a versatile and widely-used programming language, but there are certain scenarios when it may not be the best choice. Here are some examples of when not to use Python:
Python: Multi-Args

Python: Multi-Args

·2 mins
In Python, you can define a function with a variable number of arguments using the and syntax in the function definition.
Python: Inheritance

Python: Inheritance

·2 mins
Inheritance is a mechanism in object-oriented programming (OOP) that allows you to create new classes that are derived from existing classes.

2022 41 posts

Apache Karaf

Apache Karaf

·2 mins
Apache Karaf - I had only heard of it and never had practical exposure to this technology. Main questions in my mind were - What purpose does it serves? and Who uses it?
AWK

AWK

·1 min
awk is an interpreted language. The basic function of awk is to search files for lines that contains certain patterns. When the input line matches the pattern(s), awk performs specified actions on that line.
PKI

PKI

·2 mins
PKI is the core of security for most organizations, and at its heart is a couple of keys that together allows the encryption/decryption of the traffic exchanged.
Tip #Maven

Tip #Maven

·1 min
A decent developer trick is to ensure your maven points to the right JAVA version, and if you have freshly installed maven it will be pointing to the default available.
Hashicorp vault

Hashicorp vault

·1 min
“HashiCorp Vault is an identity-based secrets and encryption management system.”
Static IP’s in QEMU VM’s

Static IP’s in QEMU VM’s

·2 mins
Continuing from where I left in the blog before. If you are using looking to configure a static IP for your machines (may be your use case is similar to mine) this blog might be useful for you.
Vagrant-OSX

Vagrant-OSX

·1 min
In the previous blog, I was left with the error that had little information for me to debug. I realized since I migrated most of the files from my previous laptop it might be causing an issue.
Vagrant OSX

Vagrant OSX

·4 mins
Having just bought an M1 – MacBook Pro the issue are mounting. The premier challenge was to get my Vagrant boxes configured with provider virtualbox to run.
Gradle

Gradle

·1 min
Open source build automation tool FLEXIBLE and builds any type of software Run on JVM and must have a JDK installed to use it. Gradle models its buils as DAGs pf tasks. Build is graph of tasks Tasks consists of Actions Inputs Outputs Lifecycle Tasks Clean Check Assemble Build Build Configuration Clean Task Gradle evaluates and executes build scripts in three phases Initialization Configuration Execution
Go Modules

Go Modules

·1 min
If you are like me and getting errors while trying to compile your go lang code without having a go.mod in v1.18
Ansible: On Windows 10 Pro

Ansible: On Windows 10 Pro

·2 mins
Life is bringing it own challenges as I have moved to the United States of America. One of the immediate tech challenge has been using the loaner windows box and still be productive.
SSH Protocol

SSH Protocol

·2 mins
💬 What is SSH protocol? 💬 It is also referred to as Secure Shell, is a method for secure remote login from one computer to another. It is an alternative to telnet and rlogin
Kafka: Deploy & Test

Kafka: Deploy & Test

While I continue to learn more about architecture and design of kafka, a quickstart to deploy & test kafka is a must. Step 1: Add Chart Repo # In my local system it is already present which was confirmed by the listing
Spinnaker: Install & Configure

Spinnaker: Install & Configure

·12 mins
Spinnaker is an open-source continuous delivery platform which provides two core set of features Application Management Application deployment Applications , clusters , and server groups are the key concepts Spinnaker uses to describe your services. Key Concepts # Some of the key concepts in the spinnaker universe are covered as under
Event Streaming

Event Streaming

·2 mins
While reading Apache Kafka it was interesting analogy that they described Event streaming is the digital equivalent of the human body’s central nervous system. — Apache Kafka It draws a great parallel between how the central nervous system allows for real time event generations and consumption in terms of reflex actions. The examples are well explained and captured here.
Adding Node to a cluster

Adding Node to a cluster

In this blog, I will try add a new node to the already running cluster. My Cluster # root@master>k get nodes NAME STATUS ROLES AGE VERSION mydevmachine001830.samarthya.me Ready <none> 22h v1.23.1 mydevmachine002687.samarthya.me Ready <none> 41d v1.23.1 mydevmachine003277.samarthya.me Ready <none> 131d v1.23.1 mydevmachine003278.samarthya.me Ready <none> 131d v1.23.1 mydevmachine003417.samarthya.me Ready <none> 4m55s v1.23.1 mydevmachine003968.samarthya.me Ready <none> 131d v1.23.1 mydevmachine003969.samarthya.me Ready control-plane,master 131d v1.23.1 mydevmachine003970.samarthya.me Ready <none> 131d v1.23.1 mydevmachine003979.samarthya.me Ready <none> 29m v1.23.1 Steps to follow # Install docker Install kubeadm, kubectl & kubelet Join the cluster using the token Check the node has joined the cluster Step 1: Install docker # sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo When adding repo make sure the repo has been added successfully to the machine
The inevitable

The inevitable

·1 min
India is a complex country, the diversity is ever present and ever growing. What got me going in my deep meditative thinking is having a discussion with my Dad. We have evolved from the just enough generation to over the edge generation. Things that were uncommon during my growing up years and now the basic necessity of this generation.

2021 46 posts

Documenting GO

Documenting GO

·1 min
Documentation is a huge part of writing any software. In java you have JavaDoc, which most of the developers adhere to. It is healthy and rich way of exposing the source documentation.
K8S RBAC

K8S RBAC

·2 mins
What? # Role Based Access Control(s) is a way of regulating access to entities like storage, network etc. RBAC authorization uses rbac.authorization.k8s.io API group. API Objects # There are 4 kind of kubernetes object
SCM for git clone

SCM for git clone

·7 mins
Having used SCM plugins for quite sometime, I thought - WHY I have never used them to clone a repository and while I employ the personal access token (NOW)- The weapon of choice, I have never tried it myself.
Helm Test

Helm Test

The only advice I can give to folks who are building helm charts from scratch, is always keep it incremental and do not try to do everything at one go. At least build a decent few before you even try to attempt such a thing, else you will only end up WASTING your precious time on trivial issues which could have been avoided by incremental build, rather than the big bang approach.
Zabbix Agent

Zabbix Agent

·3 mins
In this blog I will walk you through basic steps needed to deploy a Zabbix 5 Agent on a Centos Machine. The Zabbix Release is available here. Machine # root@node4>cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) Download and install the RPM
CALICO CNI failures

CALICO CNI failures

In my cluster things went haywire all of a sudden without a proper showcase, I tried multiple things but it was just not working. Specifically my core-dns and calico-kube-controllers were not coming up and were constantly showing not ready and CrashLoop respectively
Personal Access Token

Personal Access Token

·1 min
In case you are still using the basic/auth it is time to move to personal access token. Official documentation is the best guide. Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub Enterprise Server when using the GitHub API or the command line.
Building your artifact(s)

Building your artifact(s)

·7 mins
Everything starts form a single source file and as the time goes by, it gradually transforms into multiple modules, bulky source files and a source control repository. Mostly by this time the team has already adopted a a build tool, and a repository to publish the versioned artifacts. Journey is similar for every project successful or not.
Maven Profiles

Maven Profiles

·2 mins
The concept of profiles let’s a developer define what he wants to build and what to do in specific cases. In this blog I will talk about the problem that I solved using profiles.
Ingress

Ingress

·4 mins
All right, it has been sometime since I last wrote my blog, and it has been disappointing not to have found enough time to collate and put my thoughts in a simple worded doc; better late then never. So, here I am trying to reignite the pursuit of writing at least once a week.
Om

Om

·1 min
योगस्थः कुरु कर्माणि सङ्गं त्यक्त्वा धनञ्जय ।
JUNIT5: Learning how to write the code the right way!

JUNIT5: Learning how to write the code the right way!

·2 mins
JUnit was developed by Kent Beck and Erich Gamma. Its first version was released in 1997. JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage — https://junit.org/junit5/docs/current/user-guide/ It is powerful testing framework, with many modules. These modules are part of three sub-projects
Cracking CISM

Cracking CISM

·2 mins
I recently gave CISM and I believe it is easily crackable. For those who are pursuing this certification the mantra is similar (or at least the one that I followed)
Java Stream: Examples

Java Stream: Examples

·3 mins
Streams are convenient way to reduce the line of codes, but an understanding them is equally challenging. I write this blog, after realising a desperate attempt at solving a trivial problem just took overwhelming time. (Could be that I am getting old, but never late to learn things again)
Smallest Integer

Smallest Integer

·1 min
Code available here. The ask was to identify the smallest possible integer (> 0) in the array of integers. Example # 1. [-1,2] -> 1 2. [-1,-2] -> 1 3. [1,3] -> 2 I was initially thinking of using sets and then finding out the missing one, but then reaized it is simpler and I do not need sets
ReactJS: A new app `tns`

ReactJS: A new app `tns`

·2 mins
I need to write an app for a friend and what better way to brush up old concepts and write a fresh blog in doing so. So here I am, trying to put together some old and new skills together to help create a simple webapp that will have a dashboard and basic login enabled.
Secrets

Secrets

·4 mins
To manage sensitive information you create secrets k create secret --help Create a secret using specified subcommand. Available Commands: docker-registry Create a secret for use with a Docker registry generic Create a secret from a local file, directory or literal value tls Create a TLS secret Usage: kubectl create secret [flags] [options] Use "kubectl <command> --help" for more information about a given command. Use "kubectl options" for a list of global command-line options (applies to all commands). type specifies the type of secret you are creating (options are as shown above). As I need to create only key value pairs for my dummy secret file I need to know a way of how to facilitate that, and the option -h helped me there
ClusterRole: Refresher

ClusterRole: Refresher

·4 mins
In this blog I will use kubectl to create a ClusterRole and a ClusterRoleBinding (refer to link) { "kind": "ClusterRole", "apiVersion": "rbac.authorization.k8s.io/v1", "metadata": { "name": "myclusterrole", "creationTimestamp": null }, "rules": [ { "verbs": [ "get", "list", "watch" ], "apiGroups": [ "" ], "resources": [ "persistentvolumes" ] } ] } k create clusterrole myclusterrole --verb=get,list,watch --resource=persistentvolumes k describe clusterrole myclusterrole You can use a ClusterRole to define permissions on namespaced resources and be granted within individual namespace(s) define permissions on namespaced resources and be granted across all namespaces define permissions on cluster-scoped resources
Quotes

Quotes

·1 min
“There are a thousands excuses for failure but never a good reason..” — Mark Twain “Losers make excuses, winners make progress.” — Introduction: The Miracle of self discipline.
oAuth: 2.0

oAuth: 2.0

·4 mins
What is OAuth? # From the official definition It is protocol for Authorization It allows authorization flows for web applications, desktop applications, mobile apps etc.
CISSP: Next target

CISSP: Next target

·1 min
I just finished my upgrade to Safe Certification and now will be going for CISSP certification. Wish my luck guys! Some quotes # Effective security plans anticipates change, focuses on specific and achievable objectives, potential problems, and serves as the basis of decision making. Operational plans are the shortest and most frequently updated Tactical plans are mid term plans and supports strategical plans. Strategic plans are the long term plans (usually 5 years) and usually includes risk assessment. Data classification is the primary means by which data is protected based on its need for secrecy, sensitivity and confidentiality. Data classification is the process of organizing objects, subjects, items into groups of similarities (value, cost, vulnerability, risk, power, privilege) Stratify the process of organizing and securing data based on assigned labels of importance and sensitivity. Data classification also addresses how data is removed and destroyed. Security policy is used to assign responsibilities, define acceptable risks, define roles, specify audit requirements and indicate compliance. Security policy are not optional rather mandatory. Three types of security policies are regulatory, advisory and informative.
Identity

Identity

·1 min
What is an identity? # Identity is the link that correlates the subject and the authentication process. Without a valid identity the system has no way of establishing who the subject is? Identity enables the subject to be identified and validated, and only once it has been established and authorized it is accountable for any actions taken in the system.
SAFe for Lean enterprises

SAFe for Lean enterprises

SAFe is a framework; one of the leading, for business agility that allows an organization to adapt based on its own business needs. It mixes the best of Agile, Lean, DevOps into an exhaustive system of guidelines to deliver quality, innovative products in a more predictive manner.
Fun with `goroutines`

Fun with `goroutines`

Channels are way of communication between multiple goroutines You can declare a channel and the type of content the channel will receive like below. var myChannel chan int The int above is the type of data it can receive and the data can be send using
GoLang: Hash

GoLang: Hash

·2 mins
Previously I talked about files, encoding in golang. In this LTD (learn to do) I will talk about hash package in general. https://blog.samarthya.me/wps/2021/01/30/golang-encoding/ Help # https://golang.org/pkg/hash/#Hash https://golang.org/pkg/crypto/#Hash.New https://golang.org/src/crypto/crypto.go?s=364:378#L6 https://golang.org/pkg/crypto/#pkg-subdirectories Package crypto collects common cryptographic constants. — Official golang documentation const ( MD4 Hash = 1 + iota // import golang.org/x/crypto/md4 MD5 // import crypto/md5 SHA1 // import crypto/sha1 SHA224 // import crypto/sha256 SHA256 // import crypto/sha256 SHA384 // import crypto/sha512 SHA512 // import crypto/sha512 MD5SHA1 // no implementation; MD5+SHA1 used for TLS RSA RIPEMD160 // import golang.org/x/crypto/ripemd160 SHA3_224 // import golang.org/x/crypto/sha3 SHA3_256 // import golang.org/x/crypto/sha3 SHA3_384 // import golang.org/x/crypto/sha3 SHA3_512 // import golang.org/x/crypto/sha3 SHA512_224 // import crypto/sha512 SHA512_256 // import crypto/sha512 BLAKE2s_256 // import golang.org/x/crypto/blake2s BLAKE2b_256 // import golang.org/x/crypto/blake2b BLAKE2b_384 // import golang.org/x/crypto/blake2b BLAKE2b_512 // import golang.org/x/crypto/blake2b ) Let’s try out a simple MD5 hasher.
GoLang: Hex Output

GoLang: Hex Output

·3 mins
In last few blogs I have written about reading commandline parameters reading files and using the os package. In this blog, I will combine some these items to read a file byte by byte using the bufio package func’s.
GoLang: Program Banner

GoLang: Program Banner

·2 mins
In the last blog I talked about command line arguments os.Args[]. In this I will try and create a sample banner program that shall Take 3 arguments n - Number of times a message has to be repeated. m - The message that needs to be shown. d - If debug message needs to be shown. I am going to use the flags package.
GoLang: Command line arguments

GoLang: Command line arguments

·1 min
Reading the golang official documentation is fun, today I saw the Variables in package os var Args []string It allows you to hold command line arguments and a simple main program that can help you validate this.
Missed Opportunity

Missed Opportunity

·1 min
The new year did not begin on a note I would have expected, I missed out on a golden opportunity. It would have been a wonderful exposure had it sailed through, but as someone famously said
Files: GoLang

Files: GoLang

·2 mins
In the last blog, I tried reading a file in GoLang. My repository in GitHub has all the code that I write (link) Now, I will extend the same program to write to the same file.
Pod & Volume: K8S

Pod & Volume: K8S

·1 min
Everything in the same file apiVersion: v1 kind: Pod metadata: name: redispod spec: containers: - image: redis name: redisdb volumeMounts: - name: redis-data mountPath: /data ports: - containerPort: 6379 protocol: TCP volumes: - name: redis-data persistentVolumeClaim: claimName: redisdb-pvc --- apiVersion: v1 kind: PersistentVolume metadata: name: redis-pv spec: storageClassName: "" capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/mnt/data" --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: redisdb-pvc spec: storageClassName: "" accessModes: - ReadWriteOnce resources: requests: storage: 1Gi If you deploy you will get something like
Files: GoLang

Files: GoLang

·4 mins
Learning a new syntax and the libraries is always a task, and the only way forward is gradual. In this blog I will try to create a small program to read a text file and will keep updating the program to include more sophistication
GOLang: Reflection

GOLang: Reflection

·3 mins
Must Read # https://blog.golang.org/laws-of-reflection https://golang.org/pkg/reflect/ https://golang.org/pkg/reflect/#Kind https://golang.org/pkg/reflect/#Value Package reflect implements run-time reflection, allowing a program to manipulate objects with arbitrary types. Reflection is a way to examine own structure. Let’s try and learn it via examples.
GOLang: Interfaces

GOLang: Interfaces

·3 mins
Interfaces are an interesting concept to learn in GOLANG. There are a tonne of informative articles and here is my contribution to it. In classical Object Oriented everything is treated in parlance of Object or Class like in Java or C++. In Go there is no class or inheritance.
Taint Nodes

Taint Nodes

·1 min
Reference # https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases Before we understand the tainting we should know about the Node Affinity. It the by the virtue of Affinity that pods attracts nodes as a preference or as a basic requirement.

2020 92 posts

Maven: Lifecycles

Maven: Lifecycles

·9 mins
If you have worked with big projects you must have encountered pom.xml the central configuration for your projects that helps you build, test, and define your CI pipeline. There are other options that are available too, but that is for some other day.
Fortune v1.0

Fortune v1.0

·4 mins
In one of recent discussions with Mr. X I was asked about my approach to solving the Linux cookie problem A random quote Repository will be a text file Each quote will be segregated by a '%' Can be multiline. I always believe in incremental steps so here is what I could think of
Nth Prime

Nth Prime

·2 mins
Prime number is an age old problem. I am trying to solve it via streams. class PrimeCalculator { public int nth(int nth) { if (nth <= 0) throw new IllegalArgumentException(); // Will skip the nth - 1 // 2 to n-1 return IntStream.iterate(2, i -> i + 1).filter(PrimeCalculator::isPrime).skip(nth - 1).findFirst().getAsInt(); } public static boolean isPrime(int x) { // till half of x return IntStream.rangeClosed(2, (int) (x/2) ).dropWhile(i -> x % i != 0).findFirst().isEmpty(); } } Explanation # public int nth(int nth) { if (nth <= 0) throw new IllegalArgumentException(); // Will skip the nth - 1 // 2 to n-1 return IntStream.iterate(2, i -> i + 1).filter(PrimeCalculator::isPrime).skip(nth - 1).findFirst().getAsInt(); } The method nth(int) allows you to return the nth prime starting at 2, 3, 5....
Metric Server

Metric Server

·4 mins
For my local K8S cluster of 4 nodes I wanted to get the resource usage metrics. From the official documentation of kubernetes.io These metrics can be accessed either directly by the user with the kubectl top command, or by a controller in the cluster, for example Horizontal Pod Autoscaler, to make decisions. https://kubernetes.io
controller-manager   #Unhealthy

controller-manager #Unhealthy

·2 mins
In my K8S cluster when I was looking at component status I was observing an error. Please note componentstatus is deprecated in 1.19+ but the steps will still at least help out the OCD’s like me.
Building a tree from Traversal.

Building a tree from Traversal.

·2 mins
What good is an software engineer if he can’t keep revisiting the DS problems. It is like a pill for my laziness that keeps crawling ever so often. The problem I am talking about is mentioned in this cool portal exercism.io that I use almost on a weekly basis.
Consumer <Intf>

Consumer

The utility package java.util.function has this functional interface Consumer. Each functional interface (Annotated with @FunctionalInterface) conceptually has a single method (abstract) called the functional method to which the lambda expression’s parameter and return types are matched against. Functional interfaces often represent abstract concepts like functions, actions, or predicates.
JavaStream: Characters

JavaStream: Characters

·1 min
Continuing from the last blog how about checking a pangram using streams. public class PangramChecker { private String allChars = "abcdefghijklmnopqrstuvwxyz"; public boolean isPangram(String input) { if (input.length() <= 0 || input.isBlank()){ return false; } return (allChars.chars().map(x -> (char) x).filter(x -> input.toLowerCase().indexOf(x) >= 0).count() == 26); } } All the for loops have been squeezed into a simple line
Java Streams

Java Streams

·2 mins
Stream is an new abstraction that lets one process data in a declarative way. A stream does not store data and, in that sense, is not a data structure. It also never modifies the underlying data source. The easiest way to learn a new API or a construct is by trying it. So here is an exercise that I tried to learn the Stream API. This is an exercise from exercism.io.
PS: Process Status

PS: Process Status

·2 mins
MAN Pages are one source of truth for all curious queries. man ps Name ps - report a snapshot of the current processes. It is used to display instant information about the active processes in the system.
Kernel Mode

Kernel Mode

·2 mins
The CPU operates in two modes in Linux User mode (non privileged mode) Kernel mode (System mode) When operating in Kernel mode it has un-restricted access to resources like memory and input output devices.
Linux Utils

Linux Utils

·5 mins
Ping # I have used ping often but never to an extend that I could understand the complete range of options and power available at hand.
Race condition

Race condition

·1 min
When two processes are executing concurrently, the exact order of execution of instructions is not deterministic. Without explicit synchronization instructions it is difficult to predict the outcome of these concurrent execution of process.
SYSTEMD: Mother of all processes

SYSTEMD: Mother of all processes

·4 mins
systemd is the replacement system for System V and with the primary goal of starting services in parallel. Remember init levels? GRUB: Grand Unified Boot Loader — /boot/grub/grub.conf Some key points
Writing Helm Charts

Writing Helm Charts

·8 mins
Helm is a dedicated package manager for Kubernetes. Although the Kubernetes objects are deployed in YAML’s there was a need to package and club them together and customise the deployment (not the K8S deployment).
Helm Install

Helm Install

·1 min
OS version cat /etc/issue Ubuntu 18.04.2 LTS \n \l curl https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-amd64.tar.gz > ./helm.tar.gz
Helm Charts: Packaging

Helm Charts: Packaging

·2 mins
Every software cycle includes packaging; which essentially describes how the software written is packaged and shared. For the software built for Containers Helm is a popular choice of packaging the scripts.
PlayGround: K8S

PlayGround: K8S

·6 mins
I have been working on Kubernetes cluster and will soon plan to give a Kubernetes Certified Developer exam. In my quest, I will just record some commands that I found helpful or useful in this blog. It may be multi-part, as I will keep adding on a daily basis the commands that I will be learning.
Helpful links for K8S

Helpful links for K8S

·1 min
Always remember to refer the API and elements for the YAML structure API Overview — official K8S documentation The Kuberenetes documentation that has text descriptions and good explanatory examples.
Deployments: K8S

Deployments: K8S

·1 min
A declarative way of maintaining the desired state. Continuing my example from the last blog --- # Pod deployment apiVersion: apps/v1 kind: Deployment metadata: name: go-server-deployment spec: replicas: 2 selector: matchLabels: app: my-go-server template: metadata: labels: app: my-go-server spec: containers: - name: go-server image: samarthya/epserver:2.0 resources: limits: memory: "256Mi" cpu: "1024m" env: - name: SERVERPORT value: "9090" ports: - containerPort: 9090 # Reference - https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ In my deployment, I have two replicas configured, which can be increased to three using the command like the one below.
NetworkPolicy: K8S

NetworkPolicy: K8S

·2 mins
How can a pod communicate with the other pod? The answer to this question is through a network policy. Network Policy is a specification of how groups of pods are allowed to communicate with each other and other network endpoints.
Probes: K8S

Probes: K8S

·5 mins
In this blog we will be talking about Liveness, Readiness and Startup probes of a container. A Service in Kubernetes is an abstraction which defines a logical set of Pods and a policy by which to access them. — - Life without a service What is Kubelet? # Kubelet is a primary node agent that runs on every node. Works in term of PodSpec, that describes a POD (JSON or Yaml). Liveness Probe # It is used by kubelet to decide when to restart the container. periodSeconds defines when the kubelet check periodically. initialDelaySeconds specifies the initial wait before checking. I just created a single container pod that will run touch command to create a file and then it deletes that specific file after a delay, on which the livenessProbe is listening on and then once liveness fails we can check the container.
Services: K8S

Services: K8S

·3 mins
There are multiple Kubernetes objects we will be talking about in this blog. Mainly Services, Selectors and Labels. Service is an abstraction which defines a logical set of Pods and a policy by which to access them. A Service in Kubernetes is a REST object, similar to a Pod. Service tags the pods, logically grouping them using selectors. Pods have a lifecycle, they are born, they live, process and then they die. The pods (desired state) can be managed using deployment. A label is an identifying attribute of an object, and can be defined at the creation time, and subsequently modified and added at any time. Label selector is a grouping primitive in Kubernetes and allows client/user to identify a set of objects. There are two sets of selectors equality-based and set-based. An abstract way to expose an application running on a set of Pods as a network service. The set of Pods targeted by a Service is usually determined by a selector.
ConfigMaps: K8S - 2

ConfigMaps: K8S - 2

·1 min
We looked at using the environment variables using the configmap in the last blog. The config map remains the same but now in YAML. apiVersion: v1 kind: ConfigMap metadata: name: happy-faces-mnt data: data.values: |- my.name=samarthya my.profession=engineer I will use this to mount it to a container and then see the contents of the file.
K8S

K8S

·1 min
What is K8S? # To manage distributed containerised workloads, you use Kubernetes. It is resilient declarative configuration. It is open source platform. It allows you to bundle and run your application. From the official Kubernetes documentation. Kubernetes objects # K8S objects are the persistent entities in the K8S system and thee entities are used to represent the state of the cluster.
Dockeriz'd service

Dockeriz'd service

·4 mins
Someone asked me to define a simple docker pod for the service I wrote in GOLang here. I completely forgot about it, till today. So here is my first attempt at getting a docker image for the service.
Performance Tweaks: Kibana

Performance Tweaks: Kibana

·7 mins
The performance I was getting after deploying Elasticsearch 7.6.2 and Kibana in my local VM’s was not satisfactory, so I thought of deploying a front proxy Nginx in front and enabling static resources caching.
Docker network

Docker network

·3 mins
Learn by example # In this blog let’s learn how to create a bridge network. By definition - Bridge networks are usually used when your applications run in standalone containers that need to communicate
Timeseries  & Index Management (ILM)

Timeseries & Index Management (ILM)

·7 mins
Timeseries is a data stream that is defined for a set of fields over a time period. Some examples may include, daily attendance register for an organization, wherein people punching in every-morning will be different, missing mostly for weekends or on planned and unplanned leaves.
Storage Drivers

Storage Drivers

·3 mins
The storage driver allows your to create data in the writable layers of the container and it also controls how images and containers are stored and managed on the Docker host.
Docker Registry

Docker Registry

·7 mins
A Docker registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. Docker registry is a central location that stores and distributes docker images. E.g. hub.docker.com is the default registry used when you are using docker pull.
PV, PVC

PV, PVC

·1 min
PV and PVC: PersistentVolume and PersistentVolumeClaim # PV - Defines the structure for provisioning storage for use. They have a defined lifecycle, independent of any individual Pod that uses the PV.
Elastic Alerting

Elastic Alerting

Watcher # Watcher is an Elasticsearch feature that facilitates alerting and can be used to create actions based on conditions, which are periodically evaluated using queries on your data. There are two ways of creating a watcher
A different take: SIEM

A different take: SIEM

·4 mins
Security space is an ever evolving. It never stays stagnant; everyday you see a new exploit, a new hack. As an individual, you may have Antivirus installed on your system, Firewall - UP, ports blocked yet you are not free from threat
LDAP Realm in Elasticsearch

LDAP Realm in Elasticsearch

It is a short howto guide which shall talk about adding a LDAP realm to an Elasticsearch 7.6.2 cluster. Realms # It is a concept not alien to IDAM professionals. In simple words it is a system that allows you to authenticate and authorize an incoming request. It will define the entity USER, that may include at a bare minimum (not limited to)
Elastic: Realms

Elastic: Realms

·3 mins
In this blog we will try to setup a realm for elastic authentication. yum -y install openldap-clients openldap-servers mymachine>systemctl start slapd mymachine>systemctl enable slapd Created symlink from /etc/systemd/system/multi-user.target.wants/slapd.service to /usr/lib/systemd/system/slapd.service. mymachine>slappasswd New password: Re-enter new password: {SSHA}R5nPS+zItZsQrfsw+PIQSNnEiMpLcwLs mymachine>vi /etc/openldap/slapd.d/cn=config/olcDatabase={2}hdb.ldif # AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify. # CRC32 975a66fa dn: olcDatabase={2}hdb objectClass: olcDatabaseConfig objectClass: olcHdbConfig olcDatabase: {2}hdb olcDbDirectory: /var/lib/ldap olcSuffix: dc=my-domain,dc=com olcRootDN: cn=Manager,dc=my-domain,dc=com olcDbIndex: objectClass eq,pres olcDbIndex: ou,cn,mail,surname,givenname eq,pres,sub structuralObjectClass: olcHdbConfig entryUUID: 64a2a5de-3438-103a-8e85-c1c4cc3ef35f creatorsName: cn=config createTimestamp: 20200527073533Z entryCSN: 20200527073533.541185Z#000000#000#000000 modifiersName: cn=config modifyTimestamp: 20200527073533Z mymachine>firewall-cmd --add-service=ldap success mymachine>vi ldaproot.ldif dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}R5nPS+zItZsQrfsw+PIQSNnEiMpLcwLs mymachine>ldapadd -Y EXTERNAL -H ldapi:/// -f ldaproot.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={0}config,cn=config" mymachine>cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG mymachine>chown -R ldap:ldap /var/lib/ldap/DB_CONFIG mymachine>systemctl restart slapd mymachine>ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "cn=cosine,cn=schema,cn=config" mymachine>ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "cn=nis,cn=schema,cn=config" mymachine>ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "cn=inetorgperson,cn=schema,cn=config" vi ldapdomain.ldif dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=samarthya,dc=com" read by * none dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=samarthya,dc=com dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=samarthya,dc=com dn: olcDatabase={2}hdb,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}R5nPS+zItZsQrfsw+PIQSNnEiMpLcwLs dn: olcDatabase={2}hdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=samarthya,dc=com" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=Manager,dc=samarthya,dc=com" write by * read mymachine>ldapmodify -Y EXTERNAL -H ldapi:/// -f ldapdomain.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={1}monitor,cn=config" modifying entry "olcDatabase={2}hdb,cn=config" modifying entry "olcDatabase={2}hdb,cn=config" modifying entry "olcDatabase={2}hdb,cn=config" modifying entry "olcDatabase={2}hdb,cn=config" mymachine>vi baseldapdomain.ldif dn: dc=samarthya,dc=com objectClass: top objectClass: dcObject objectclass: organization o: samarthya com dc: samarthya dn: cn=Manager,dc=samarthya,dc=com objectClass: organizationalRole cn: Manager description: Directory Manager dn: ou=People,dc=samarthya,dc=com objectClass: organizationalUnit ou: People dn: ou=Group,dc=samarthya,dc=com objectClass: organizationalUnit ou: Group mymachine>ldapadd -x -D cn=Manager,dc=samarthya,dc=com -W -f baseldapdomain.ldif Enter LDAP Password: adding new entry "dc=samarthya,dc=com" adding new entry "cn=Manager,dc=samarthya,dc=com" adding new entry "ou=People,dc=samarthya,dc=com" adding new entry "ou=Group,dc=samarthya,dc=com" dn: cn=Manager,ou=Group,dc=samarthya,dc=com objectClass: top objectClass: posixGroup gidNumber: 1009 ldapadd -x -W -D "cn=Manager,dc=samarthya,dc=com" -f ldapgroup.ldif Enter LDAP Password: adding new entry "cn=Manager,ou=Group,dc=samarthya,dc=com" mymachine>useradd samarthya mymachine>passwd samarthya Changing password for user samarthya. mymachine>ldapadd -x -D cn=Manager,dc=samarthya,dc=com -W -f ldauser.ldif Enter LDAP Password: adding new entry "uid=samarthya,ou=People,dc=samarthya,dc=com" dn: uid=samarthya,ou=People,dc=samarthya,dc=com objectClass: top objectClass: account objectClass: posixAccount objectClass: shadowAccount cn: samarthya uid: samarthya uidNumber: 1005 gidNumber: 1005 homeDirectory: /home/samarthya userPassword: {SSHA}R5nPS+zItZsQrfsw+PIQSNnEiMpLcwLs loginShell: /bin/bash gecos: samarthya shadowLastChange: 0 shadowMax: 0 shadowWarning: 0 Installing phpLdap # yum install php-ldap php-mbstring php-pear php-xml https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7
Elastic: _security API

Elastic: _security API

·2 mins
Kibana is an effective way of managing users; but as a programmer you always need an API. It helps to integrate with other applications you are building Quick and clean way without any cosmetics > GET /_security/_authenticate HTTP/1.1 > Host: myserver.elastic.node:9200 > Authorization: Basic ABCDEFGHIJKLMNOP== > User-Agent: insomnia/7.1.1 > Accept: */* < HTTP/1.1 200 OK < content-type: application/json; charset=UTF-8 < content-length: 236 * Received 236 B chunk * Connection #2 to host myserver.elastic.node left intact GET https://myserver.elastic.node:9200/_security/_authenticate I have added basic authentication to quickly check
Go: Helpful links

Go: Helpful links

·1 min
Helpful links # http package How to write go code. First program Effective go GO webserver GO Packages Specification - Go JSON in Go blog Go command reference Using Go modules These are some of the helpful links I have used in the past for understanding Go and developing code.
WebService: In golang

WebService: In golang

·10 mins
Having practiced creating loads of Console based programs of golang, it is now time to try something new - A Web Service. In this blog, I will try and create a Web Service (RESTful) that will be built entirely on Go.
GoLang: SmipleCipher v2.0

GoLang: SmipleCipher v2.0

So continuing from the last blog where I wrote a crude version of SimpleCipher and was inclined on removing the duplicate code, here I am with the improved version. Handy links # [fmt](https://golang.org/pkg/fmt/) package [strings](https://golang.org/pkg/strings/) package. Defining types # While I compiled and unit tested code the general feeling was what can be optimized.
GoLang: SimpleCipher

GoLang: SimpleCipher

·4 mins
Hello back again, Golang is just a new syntax for me. Even though behind the scenes they developers have simplified many things, for a consumer like me writing a program is more about learning the new syntax and getting familiarized with the control and stack.
Analyze: _analyze api

Analyze: _analyze api

Text is a key data in most of the information that is ingested in the elasticsearch, and whether it is type text or keyword it requires careful consideration to choose which analyzer to use.
Painless Scripting

Painless Scripting

·1 min
Painless is a simple, secure scripting language designed specifically for use with Elasticsearch. The official guide is available here.
My li'l one

My li'l one

·1 min
[gallery columns=“1” size=“full” link=“none” ids=“617” orderby=“rand”]
Index Modules

Index Modules

·1 min
Index modules are a complex subject; they are defined per index and control every aspect of an index.
Pipeline: _ingest API

Pipeline: _ingest API

Pipelines is a smooth way of processing some incoming data. In this blog, I will walk through some of the items I have tried my hands on. Pipeline # A pipeline is a definition of a series of processors that are to be executed in the same order as they are declared.
Cluster: Elastic 7.3

Cluster: Elastic 7.3

·3 mins
What is intriguing about elastic stack is that; it can do so many things that it simplifies the life of a security analyst. The uphill task is to learn the technology itself, but once you have mastered it, things are much easier.
Kuberenetes: Rest API

Kuberenetes: Rest API

·1 min
The Rest API is the fundamental fabric of K8S. Every communication that happens between components, happens through the API invocations. Consequently, everything in the Kubernetes platform is treated as an API object and has a corresponding entry in the API.
Kubectl - A revisit

Kubectl - A revisit

·3 mins
It is always fun learning and trying out some new tech. In this blog, I will try and capture my experience of running my first pod using kubectl. If you wish to learn how to install a typical master, worker cluster of K8S I recommend going through this blog.
API _reindex

API _reindex

·3 mins
I will extrapolating based on the original documentation available here and based on some of my experience using this API. It copies documents from one index to another. Extracts the document source from the source index and indexes the documents into the destination index. You can copy all documents to the destination index, or reindex a subset of the documents.
ECS: Elastic common schema

ECS: Elastic common schema

·1 min
Open specification for document fields for data ingested in Elasticsearch. It brings uniformity to certain common fields that are used across data sources. ECS defines two field levels Core fields: Represent the fields that are most common across all use cases. Extended fields: That are not part of the core and specific to cases. Field sets # Field sets are multiple groups of related fields defined by ECS. More information here.
Text - Elastic

Text - Elastic

·4 mins
If you are not aware of mapping, it might be a little confusing but I would try my best. Every document that gets indexed in elastic has fields, every field that is accessible has an associated type with it (Inverted Index) which helps elastic organize data for quick retrieval.
Say a Number

Say a Number

·4 mins
With the Corona-Lockdown in place “literally”, it was time to squeeze out some me-time to continue the quest for GO-Proficiency.
Snapshot & Restore

Snapshot & Restore

If you have a production grade elastic cluster it is always recommended to do a regular backup as a standard practice. Snapshot is a backup of information, that can be be used to restore the last known good state of the system
Elasticsearch v7.6

Elasticsearch v7.6

·9 mins
What I have been doing is evaluating Elasticsearch. The indexing, searching (Phrase, Similarity, Structured, Full Text, Complex), clustering etc. In this blog I will just try and simplify the learning curve.
Package String

Package String

Just like Java or C++ there are standard libraries (packages) available with golang. The one that you might end up using the most often is strings. For this blog, I was writing another practice exercise that is meant to count number of words in an input string.
Sieve of Eratosthenes

Sieve of Eratosthenes

·2 mins
Sieve is an ancient and an ingenious way of calculating primes. It recursively eliminates all the multiples of a particular number up till a range and the left overs are essentially primes.
Authentication: Elastic

Authentication: Elastic

·3 mins
As a software professional, I have been working in the space of IAM, SSO, DRM for quite some time and from my experience I can say, the way Elastic has simplified the integration of external or internal security for access is a treat for fellow developers. It was interesting to experiment with the security settings, and control tenancy.
GOLANG: Proteins & RNA

GOLANG: Proteins & RNA

·5 mins
It was an interesting exercise, and I solved in three ways. More details available here @ exercism.io Introduction # RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so:
Elastic Cluster API

Elastic Cluster API

·1 min
Elastic Stack Monitoring Service is available with XPack only. GET _cluster/settings { “persistent” : { “xpack” : { “monitoring” : { “elasticsearch” : { “collection” : { “enabled” : “false” } }, “collection” : { “enabled” : “true” } } } }, “transient” : { } }
Pangram

Pangram

·1 min
A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the alphabet at least once. The best known English pangram is: The quick brown fox jumps over the lazy dog.
Never ..be

Never ..be

·1 min
The date was set and the time was defined, nerves were there but so were the smiles. The pain of wrong prognosis hadn’t set in, the malevolent doc had played her game.
Security Analytics

Security Analytics

* Header image from Elastic.co As we move towards the micro-service/container economy where there are heaps of products available in form of applications to be downloaded & installed on primarily two platforms Android and IOS, we just cant underline the security implications enough.
Asynchronous

Asynchronous

·1 min
I learned a whole new dimension to this word, quite recently. Usually this word is used to express the non-blocking way of calling a program, a service or a code.
Elastic 7.5

Elastic 7.5

·1 min
Installing # Step 1: Using docker # yum install docker docker pull docker.elastic.co/elasticsearch/elasticsearch:7.5.1 systemctl list-units --type=service docker version Client: Version: 1.13.1 API version: 1.26 Package version: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? sudo systemctl start docker docker version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64 Go version: go1.10.3 Git commit: 7f2769b/1.13.1 Built: Sun Sep 15 14:06:47 2019 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-103.git7f2769b.el7.centos.x86_64 Go version: go1.10.3 Git commit: 7f2769b/1.13.1 Built: Sun Sep 15 14:06:47 2019 OS/Arch: linux/amd64 Experimental: false docker pull docker.elastic.co/elasticsearch/elasticsearch:7.5.1 Trying to pull repository docker.elastic.co/elasticsearch/elasticsearch ... 7.5.1: Pulling from docker.elastic.co/elasticsearch/elasticsearch c808caf183b6: Pull complete 05ff3f896999: Pull complete 82fb7fb0a94e: Pull complete c4d0024708f4: Pull complete 136650a16cfe: Pull complete 968db096c092: Pull complete 42547e91692f: Pull complete Digest: sha256:b0960105e830085acbb1f9c8001f58626506ce118f33816ea5d38c772bfc7e6c Status: Downloaded newer image for docker.elastic.co/elasticsearch/elasticsearch:7.5.1 docker pull docker.elastic.co/kibana/kibana:7.5.1
Concurrency

Concurrency

Last few weeks have been interesting, a new year just embarked, my learning pace slowed down; comparatively due to the festivities and obligations around, but I am still trying to maintain.

2019 20 posts

JS Reduce and forEach

JS Reduce and forEach

·3 mins
I have been polishing my Go and JS skills recently and today learned about how to use the reduce() and forEach() method.
Optimizing in JS

Optimizing in JS

·2 mins
You never stop learning is not just a phrase, it is something I live everyday. Today, I was just trying out my skills with JS and was solving an innocuous problem, in JS.
MySQL/MariaDB on MAC

MySQL/MariaDB on MAC

·1 min
While trying to troubleshoot an inhouse application I had to setup a quick MySQL instance which led me to install my first instance of MariaDB on my local MAC machine.
KubeLab

KubeLab

·3 mins
Kubernetes cloud_user@ip-10-0-1-101:~$ kubectl version Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.11", GitCommit:"25074a190ef2a07d8b0ed38734f2cb373edfb868", GitTreeState:"clean", BuildDate:"2019-09-18T14:34:46Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"} cloud_user@ip-10-0-1-101:~$ kubectl api-resources NAME SHORTNAMES APIGROUP NAMESPACED KIND bindings true Binding componentstatuses cs false ComponentStatus configmaps cm true ConfigMap endpoints ep true Endpoints events ev true Event limitranges limits true LimitRange namespaces ns false Namespace nodes no false Node persistentvolumeclaims pvc true PersistentVolumeClaim persistentvolumes pv false PersistentVolume pods po true Pod podtemplates true PodTemplate replicationcontrollers rc true ReplicationController resourcequotas quota true ResourceQuota secrets true Secret serviceaccounts sa true ServiceAccount services svc true Service mutatingwebhookconfigurations admissionregistration.k8s.io false MutatingWebhookConfiguration validatingwebhookconfigurations admissionregistration.k8s.io false ValidatingWebhookConfiguration customresourcedefinitions crd,crds apiextensions.k8s.io false CustomResourceDefinition apiservices apiregistration.k8s.io false APIService controllerrevisions apps true ControllerRevision daemonsets ds apps true DaemonSet deployments deploy apps true Deployment replicasets rs apps true ReplicaSet statefulsets sts apps true StatefulSet tokenreviews authentication.k8s.io false TokenReview localsubjectaccessreviews authorization.k8s.io true LocalSubjectAccessReview selfsubjectaccessreviews authorization.k8s.io false SelfSubjectAccessReview selfsubjectrulesreviews authorization.k8s.io false SelfSubjectRulesReview subjectaccessreviews authorization.k8s.io false SubjectAccessReview horizontalpodautoscalers hpa autoscaling true HorizontalPodAutoscaler cronjobs cj batch true CronJob jobs batch true Job certificatesigningrequests csr certificates.k8s.io false CertificateSigningRequest leases coordination.k8s.io true Lease events ev events.k8s.io true Event daemonsets ds extensions true DaemonSet deployments deploy extensions true Deployment ingresses ing extensions true Ingress networkpolicies netpol extensions true NetworkPolicy podsecuritypolicies psp extensions false PodSecurityPolicy replicasets rs extensions true ReplicaSet networkpolicies netpol networking.k8s.io true NetworkPolicy poddisruptionbudgets pdb policy true PodDisruptionBudget podsecuritypolicies psp policy false PodSecurityPolicy clusterrolebindings rbac.authorization.k8s.io false ClusterRoleBinding clusterroles rbac.authorization.k8s.io false ClusterRole rolebindings rbac.authorization.k8s.io true RoleBinding roles rbac.authorization.k8s.io true Role priorityclasses pc scheduling.k8s.io false PriorityClass storageclasses sc storage.k8s.io false StorageClass volumeattachments storage.k8s.io false VolumeAttachment cloud_user@ip-10-0-1-101:~$ kubectl get cm NAME DATA AGE fruit-service-ambassador-config 1 5m49s Basic Commands (Beginner): create Create a resource from a file or from stdin. expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster set Set specific features on objects Basic Commands (Intermediate): explain Documentation of resources get Display one or many resources edit Edit a resource on the server delete Delete resources by filenames, stdin, resources and names, or by resources and label selector Deploy Commands: rollout Manage the rollout of a resource scale Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job autoscale Auto-scale a Deployment, ReplicaSet, or ReplicationController Cluster Management Commands: certificate Modify certificate resources. cluster-info Display cluster info top Display Resource (CPU/Memory/Storage) usage. cordon Mark node as unschedulable uncordon Mark node as schedulable drain Drain node in preparation for maintenance taint Update the taints on one or more nodes Troubleshooting and Debugging Commands: describe Show details of a specific resource or group of resources logs Print the logs for a container in a pod attach Attach to a running container exec Execute a command in a container port-forward Forward one or more local ports to a pod proxy Run a proxy to the Kubernetes API server cp Copy files and directories to and from containers. auth Inspect authorization Advanced Commands: diff Diff live version against would-be applied version apply Apply a configuration to a resource by filename or stdin patch Update field(s) of a resource using strategic merge patch replace Replace a resource by filename or stdin wait Experimental: Wait for a specific condition on one or many resources. convert Convert config files between different API versions Settings Commands: label Update the labels on a resource annotate Update the annotations on a resource completion Output shell completion code for the specified shell (bash or zsh) Other Commands: api-resources Print the supported API resources on the server api-versions Print the supported API versions on the server, in the form of "group/version" config Modify kubeconfig files plugin Provides utilities for interacting with plugins. version Print the client and server version information Usage: kubectl [flags] [options]
NGRX

NGRX

·2 mins
Inspired by Redux, Store is RxJS powered state management for Angular applications. Store is a container for state of the application.
Security Assertion Markup Language

Security Assertion Markup Language

·1 min
Security Assertion Markup Language (SAML) is an open standard that allows identity providers (IdP) to pass authorization credentials to service providers (SP).
Spring Data-LDAP

Spring Data-LDAP

·7 mins
I have a small problem at hand which girdles around learning Angular, with a Spring enabled Rest endpoints which uses a DB to store data and have security layer in between that should interact with a…
Locale

Locale

Did you ever see a warning printed on your console the moment you log into your Linux machine and did that warning ever complaned to you about the benign locale?
CSS continued

CSS continued

·1 min
State dependent styling, e.g Style a checkbox when it is in checked state. It is usually denoted by a preceding colon ‘:’ (without the quote).
CSS and HTML to dom.

CSS and HTML to dom.

·5 mins
Having worked on different technologies I never took HTML very seriously till a couple of years back.
Vue - Lesson 2

Vue - Lesson 2

·1 min
Zero configuration CLI command line interface Create things rapidly select libraries you want to use Optimize the loading speed CHoose your own adventure Starting from a blank state organizing the structure.
Learning Step - 1

Learning Step - 1

·2 mins
The best way to learn a technology is to create something from scratch and as my ever wandering brain hops from one framework to another I am starting out on a new conquest of learning something that professionally I have never tried. Not just a scripting technology but learning the new enabler platforms as well.
What did the horse say?

What did the horse say?

·1 min
If you ever wondered what is fun? You need to get yourself a company of a Special kid; by special I mean kids with some special needs.
Saturday morning

Saturday morning

·1 min
Morning was not early today, had a good night sleep and woke up at around 9:00 to a door bell. My devil close to my side and full of energy just stretching his tools of destruction.