Skip to content

Commit

Permalink
added kubernetes node blog
Browse files Browse the repository at this point in the history
  • Loading branch information
niksihora committed May 10, 2024
0 parents commit 6e2afa7
Show file tree
Hide file tree
Showing 3,260 changed files with 37,892 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
79 changes: 79 additions & 0 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.125.5
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
TZ: Asia/Kolkata
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/FixIt"]
path = themes/FixIt
url = https://github.com/hugo-fixit/FixIt.git
Empty file added .hugo_build.lock
Empty file.
5 changes: 5 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
10 changes: 10 additions & 0 deletions assets/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": [
"..\\themes\\FixIt\\assets\\*"
]
}
}
}
55 changes: 55 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
+++
title = 'About Me'
date = 2024-05-03T18:41:56+05:30
draft = false
+++

As a __Linux Administrator__ at [Tata Consultancy Services](https://tcs.com/), I manage and maintain the Linux servers and networks for various clients, ensuring optimal performance, security, and reliability. I have received multiple awards for my excellence in service delivery, customer satisfaction, and problem resolution, such as the On The Spot Award and the Certificate of Appreciation (Performer of the Quarter).
With over six years of experience in Linux system administration, I have proficiency in:
- Red Hat Enterprise Linux
- Ansible
- Kubernetes
- Docker
- Cloud technologies

## My System Admin Experience
- Mar/2023 - current position : __Linux Administrator__ working from [Tata Consultancy Services](https://tcs.com/) Mumbai, India.

- May/2019 - Feb/2023 : __IT Engineer__ worked from [Microfiber Corp Pvt Ltd](https://microfibercorp.com/) Silvassa, India.

- Jul/2017 - Jan/2019 : __IT Assistant__ worked from [Internex Poly Pvt Ltd](https://internexpoly.com) Silvassa, India.

_Now embarking on a journey towards DevOps and Project Management feels like the natural next step in my career. Having navigated through diverse professional terrains, I've gained a perceptive eye for the intricacies of technical operations._


## Education
- Postgraduate Degree in International Business from [SCDL](https://scdl.net/) in December 2021.
- Bachelor of Computer Application from [Pune University](http://www.unipune.ac.in/default.htm) in May 2017.

## Passion & Commitment
I am passionate about learning new skills and staying updated with the latest trends and innovations in the IT industry.

## Technical Skills/Certificates
- **System Administration:** Red Hat Enterprise Linux(RHEL), CentOS, Ubuntu, Windows Server, Hyper-V, Nginx, Apache, JBoss, Firewalld.
- **Networking:** TCP/IP, DNS, DHCP, VPN, VLANs
- **Scripting/Programming:** PowerShell, Bash, Python, Ansible.
- **Containerization:** Kubernetes, Podman, Docker, Crictl, Yaml
- **Certifications:**
{{< raw >}}
<div style="padding: 10px; text-align: center;">
<div data-iframe-width="200" data-iframe-height="270" data-share-badge-id="d6b00133-6cab-4217-9ea9-503911ea0fa6" data-share-badge-host="https://www.credly.com"></div><script type="text/javascript" async src="//cdn.credly.com/assets/utilities/embed.js"></script>
<div data-iframe-width="200" data-iframe-height="270" data-share-badge-id="32522a75-fd4e-4da7-93d9-cdaa5572f24a" data-share-badge-host="https://www.credly.com"></div><script type="text/javascript" async src="//cdn.credly.com/assets/utilities/embed.js"></script>
<div data-iframe-width="200" data-iframe-height="270" data-share-badge-id="8114b252-9fa1-4f6d-b79a-82d2db5a1de5" data-share-badge-host="https://www.credly.com"></div><script type="text/javascript" async src="//cdn.credly.com/assets/utilities/embed.js"></script>
<div data-iframe-width="200" data-iframe-height="270" data-share-badge-id="f86e1607-998e-43f3-9c1f-7c58638bb661" data-share-badge-host="https://www.credly.com"></div><script type="text/javascript" async src="//cdn.credly.com/assets/utilities/embed.js"></script>
</div>
{{< /raw >}}

## Languages
- English (C1)
- Hindi (Native speaker)
- Gujarati (Native speaker)

## Contact Information
- **Email:** [iam@itbaba.org](mailto:iam@itbaba.org)
- **LinkedIn:** [niksihora](https://www.linkedin.com/in/nik-sihora/)
- **Github:** [https://github.com/niksihora](https://github.com/niksihora)
104 changes: 104 additions & 0 deletions content/posts/kubernetes-node/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: Kubernetes Node
subtitle:
date: 2024-05-10T12:05:51+05:30
slug:
draft: false
author:
name: Niksihora
link:
email:
avatar:
description:
keywords:
license:
comment: false
weight: 0
tags:
- kubernetes
categories:
- kubernetes
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false
summary:
resources:
- name: featured-image
src: kubernetes.png
toc: true
math: false
lightgallery: false
password:
message:
repost:
enable: true
url:

# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---
<!--more-->
# Kubernetes Node
- A physical or virtual machine on which Kubernetes is installed
- **Nodes are cluster scoped. They are not scoped within a namespace.**
- When you install Kubernetes on a node, the following components are installed. Some of them are used in worker nodes and the rest are used in master nodes.
- API Server
- `etcd` Service
- Kubelet Service
- Container Runtime
- Controller
- Scheduler
- A **cluster** is a collection of nodes grouped together

## Worker Nodes

![worker-node](/posts/kubernetes-node/worker-node.png)

- These nodes do the actual work so they need to have more resources
- Each worker node has multiple pods running on it
- 3 processes must be installed on every worker node
- **Container Runtime** (eg. docker)
- **Kubelet**
- process of Kubernetes
- starts pods and runs containers inside them
- allocates resources from the node to the container
- **Kubeproxy**
- process of Kubernetes
- forwards the requests to pods intelligently
- Image
- Kubeproxy forwards requests to the DB pod running on the same node to minimize network overhead.

![kube-proxy](/posts/kubernetes-node/kube-proxy.png)


## Master Nodes

![master-node](/posts/kubernetes-node/master-node.png)

- Control the cluster state & manage worker nodes
- Need less resources as they don't do the actual work
- Multi-master setup is often used for fault tolerance
- 4 processes run on every master node
- **API Server**
- User interacts with the cluster via the API server using a client (Kubernetes Dashboard, CLI, or Kubernetes API)
- Cluster gateway (acts as the entry point into the cluster)
- Can be used for authentication

![kube-apiserver](/posts/kubernetes-node/kube-apiserver.png)

- **Scheduler**
- Decides the node where the new pod should be scheduled and sends a request to the Kubelet to start a pod.

![kube-scheduler](/posts/kubernetes-node/kube-scheduler.png)

- **Controller**
- Detects state changes like crashing of pods
- If a pod dies, it requests scheduler to schedule starting up of a new pod

![kube-controller](/posts/kubernetes-node/kube-controller.png)

- **etcd**
- Key-value store of the cluster state (also known as cluster brain)
- Cluster changes get stored in the etcd
- In multi-master configuration, etcd is a distributed key-value store
- Application data is not stored in the etcd
Binary file added content/posts/kubernetes-node/kube-apiserver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/kube-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/kube-proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/kube-scheduler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/kubernetes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/master-node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/kubernetes-node/worker-node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'Niksihora'
theme = 'FixIt'

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Target":"css/style.min.css","MediaType":"text/css","Data":{}}
18 changes: 18 additions & 0 deletions themes/FixIt/.auto-changelog/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"output": "CHANGELOG.md",
"template": ".auto-changelog/template.hbs",
"handlebarsSetup": ".auto-changelog/setup.js",
"sortCommits": "relevance",
"commitLimit": false,
"replaceText": {
"^(Feat|feat):": ":sparkles: Feat:",
"^(Fix|fix):": ":bug: Fix:",
"^(Build|build):": ":hammer: Build:",
"^(Refactor|refactor):": ":recycle: Refactor:",
"^(Style|style):": ":lipstick: Style:",
"^(Perf|perf):": ":zap: Perf:",
"^(Test|test):": ":white_check_mark: Test:",
"^(Docs|docs):": ":memo: Docs:",
"^(Chore|chore):": ":wrench: Chore:"
}
}
31 changes: 31 additions & 0 deletions themes/FixIt/.auto-changelog/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Custom Handlebars helpers
module.exports = function (Handlebars) {
/**
* Handlebars helper to replace a string with another string
* @param {String} context the string to replace
* @param {Object} options
* @param {String} options.hash.from the string to replace
* @param {String} options.hash.to the string to replace with
* @example {{replace "foo bar" from="foo" to="baz"}} => "baz bar"
*/
Handlebars.registerHelper('replace', function (context, options) {
return context.replace(options.hash.from, options.hash.to)
})
/**
* Handlebars helper to convert a name to a GitHub username
* @param {String} context name to convert
* @param {Object} options
* @param {Boolean} [options.hash.linked=true] whether to return a linked username
* @example {{githubUser "Cell"}} => "Lruihao"
*/
Handlebars.registerHelper('githubUser', function (context, { hash: { linked = false }}) {
const map = {
'Cell': "Lruihao",
}
const username = map[context] || context
if (linked) {
return `[@${username}](https://github.com/${username})`
}
return `@${username}`
})
}
70 changes: 70 additions & 0 deletions themes/FixIt/.auto-changelog/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Changelog

All notable changes to this project will be documented in this file.
{{!-- if need, set replaceText in config.json "#(\\d+)": "[#$1](https://github.com/hugo-fixit/FixIt/issues/$1)" --}}

{{#each releases}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}

{{#if summary}}
{{summary}}
{{/if}}

{{!-- List commits with `Breaking change: ` somewhere in the message --}}
{{#commit-list commits heading='### :boom: Breaking Changes' message='^(Breaking change|BREAKING CHANGE):'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that add new features, but exclude those that have `:sparkles:` in the message --}}
{{#commit-list commits heading='### :tada: New Features' message='(:tada:|Feat:|feat:)' exclude='^:sparkles:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that enhance existing features, but exclude those that have `:tada:` in the message --}}
{{#commit-list commits heading='### :sparkles: Enhancements' message='(:sparkles:|Feat:|feat:|Perf:|perf:)' exclude='^:tada:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that bug fixes --}}
{{#commit-list commits heading='### :bug: Bug Fixes' message='(:bug:|Fix:|fix:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List commits that improve the documentation --}}
{{#commit-list commits heading='### :memo: Documentation' message='(:memo:|Docs:|docs:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

{{!-- List other changes commits --}}
{{#commit-list commits heading='### :wrench: Other Changes' message='(Refactor:|refactor:|Style:|style:|Test:|test:|Chore:|chore:|Build:|build:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}

- **Full Changelog**: {{href}}

---

### Uncategorized

{{#if merges}}
#### Merged pull requests

{{#each merges}}
{{!-- {{#if href}}[`#{{id}}`]({{href}}){{/if}} --}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} by {{githubUser author}} in {{#if id}}#{{id}}{{/if}}
{{/each}}
{{/if}}

{{#if fixes}}
#### Closed issues

{{#each fixes}}
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if id}}#{{id}}{{/if}}{{/each}} by {{githubUser commit.author}}
{{/each}}
{{/if}}

{{/each}}
1 change: 1 addition & 0 deletions themes/FixIt/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/lib/**/* linguist-vendored
Loading

0 comments on commit 6e2afa7

Please sign in to comment.