Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
8c8c8f0
Create solution.md
DevMadhup Mar 18, 2025
7775351
Create solution.md
DevMadhup Mar 21, 2025
7ed5b1c
Create solution.md
DevMadhup Mar 22, 2025
9dee140
Update challenge.md
mdsraihaniqbal1999 Mar 23, 2025
2e5a98f
Update challenge.md
mdsraihaniqbal1999 Mar 23, 2025
79a1365
Update challenge.md
mdsraihaniqbal1999 Mar 23, 2025
5cc5c95
Update challenge.md
mdsraihaniqbal1999 Mar 23, 2025
e7bcb22
Create Dockerfile
mdsraihaniqbal1999 Mar 23, 2025
f238a60
Create app.py
mdsraihaniqbal1999 Mar 23, 2025
009e34f
Create module1.md
A-ravi Mar 23, 2025
35e215f
Merge pull request #16 from DevMadhup/patch-3
Sagar2366 Mar 24, 2025
8bcccbe
Merge pull request #15 from DevMadhup/patch-2
Sagar2366 Mar 24, 2025
9673fa9
Merge pull request #17 from DevMadhup/patch-4
Sagar2366 Mar 24, 2025
fb8a9e9
Merge pull request #18 from mdsraihaniqbal1999/main
Sagar2366 Mar 24, 2025
eec2238
Merge pull request #20 from Krishnan-Raghavan/main
Sagar2366 Mar 24, 2025
e98bcbc
Update solution.md
Sagar2366 Mar 25, 2025
7552d97
Merge branch 'Sagar2366:main' into linxu-intro
A-ravi Mar 25, 2025
dd196a1
add os architecture image
A-ravi Mar 25, 2025
5abc718
Update solution.md
Sagar2366 Mar 26, 2025
962ca18
Update solution.md
Sagar2366 Mar 26, 2025
7013327
Update solution.md
Sagar2366 Mar 26, 2025
88016f6
Create solution.md for Day10
DevMadhup Mar 26, 2025
536a1dc
Merge pull request #21 from DevMadhup/patch-5
Sagar2366 Mar 26, 2025
ef51be4
Merge pull request #19 from A-ravi/linxu-intro
Sagar2366 Mar 26, 2025
2115bd4
Update challenge.md
Sagar2366 Mar 27, 2025
8e73765
Update challenge.md
Sagar2366 Mar 27, 2025
1932928
Update challenge.md
Sagar2366 Mar 27, 2025
4a851c2
Update challenge.md
Sagar2366 Mar 27, 2025
fdfa9bf
Create Challenge.md
mdsraihaniqbal1999 Mar 27, 2025
6d219bc
Merge pull request #22 from mdsraihaniqbal1999/main
Sagar2366 Mar 27, 2025
1b6bf80
Create challenge.md
Sagar2366 Mar 28, 2025
da3eacf
Update challenge.md
Sagar2366 Mar 28, 2025
d674a05
day7 action
Sagar2366 Mar 28, 2025
332ee28
Update manual.yml
Sagar2366 Mar 28, 2025
7cf725d
Update challenge.md
Sagar2366 Mar 28, 2025
2d716c8
Update manual.yml
Sagar2366 Mar 28, 2025
3f47811
Update manual.yml
Sagar2366 Mar 28, 2025
83fe8d4
Update manual.yml
Sagar2366 Mar 28, 2025
0d4455c
Update manual.yml
Sagar2366 Mar 28, 2025
0f0a6f1
Update manual.yml
Sagar2366 Mar 28, 2025
0b9247f
Update manual.yml
Sagar2366 Mar 28, 2025
074b68d
Update manual.yml
Sagar2366 Mar 28, 2025
dc162be
Update manual.yml
Sagar2366 Mar 28, 2025
f6bf797
Update manual.yml
Sagar2366 Mar 28, 2025
ef19cab
Update manual.yml
Sagar2366 Mar 28, 2025
1358616
Update manual.yml
Sagar2366 Mar 28, 2025
7db8547
Update manual.yml
Sagar2366 Mar 28, 2025
3271740
Update manual.yml
Sagar2366 Mar 28, 2025
f4e4540
Create day7-challenge.yaml
Sagar2366 Mar 28, 2025
9337d4e
Delete .github/workflows/manual.yml
Sagar2366 Mar 28, 2025
6f259da
Delete DailyChallenges/Season2/DAY-07 directory
Sagar2366 Mar 28, 2025
de18be5
Update challenge.md
Sagar2366 Mar 28, 2025
dc5fa6b
Update challenge.md
Sagar2366 Mar 28, 2025
4969e90
Create readme.md
Sagar2366 Apr 7, 2025
1311074
Update readme.md
Sagar2366 Apr 7, 2025
ad8bb70
Update readme.md
Sagar2366 Apr 7, 2025
e82de1d
Create readme.md
Sagar2366 Apr 7, 2025
76de012
Update readme.md
Sagar2366 Apr 7, 2025
d3ec44a
Update readme.md
Sagar2366 Apr 7, 2025
132d633
Create 1_shell_terminal_windows.md
Sagar2366 Apr 8, 2025
025ef43
Create 2_recalling_commands_history.md
Sagar2366 Apr 8, 2025
a92def9
Update readme.md
Sagar2366 Apr 8, 2025
8e282eb
Update readme.md
Sagar2366 Apr 8, 2025
238b728
Update readme.md
Sagar2366 Apr 8, 2025
c1b6fd3
Update readme.md
Sagar2366 Apr 8, 2025
d744ce7
Create readme.md
Sagar2366 Apr 9, 2025
9b647bb
Create mounts_in_linux.md
Sagar2366 Apr 9, 2025
3a5622d
Create core_filesystem_commands.md
Sagar2366 Apr 9, 2025
324bb91
Update core_filesystem_commands.md
Sagar2366 Apr 9, 2025
f332873
Update core_filesystem_commands.md
Sagar2366 Apr 9, 2025
83bf08c
Update core_filesystem_commands.md
Sagar2366 Apr 9, 2025
e474bfe
Create 3_links.md
Sagar2366 Apr 9, 2025
829671e
Rename core_filesystem_commands.md to 1_core_filesystem_commands.md
Sagar2366 Apr 9, 2025
f5fce44
Rename mounts_in_linux.md to 2_mounts_in_linux.md
Sagar2366 Apr 9, 2025
822bc4d
Create 4_compression_archive.md
Sagar2366 Apr 9, 2025
85ab470
Update readme.md
Sagar2366 Apr 9, 2025
6c8903e
Update readme.md
Sagar2366 Apr 9, 2025
28242d4
Create 0_filesystem.md
Sagar2366 Apr 9, 2025
7a7cfed
Update 3_links.md
Sagar2366 Apr 9, 2025
49bb1cb
Update readme.md
Sagar2366 Apr 9, 2025
ca6e45a
Update readme.md
Sagar2366 Apr 9, 2025
a130895
Update readme.md
Sagar2366 Apr 9, 2025
76a66f0
Create readme.md
Sagar2366 Apr 9, 2025
ae3aae3
Update readme.md
Sagar2366 Apr 9, 2025
81c78c1
Create 1_vi_editor_tips.md
Sagar2366 Apr 9, 2025
575ad7e
Create 2_
Sagar2366 Apr 9, 2025
58059c7
Update and rename 2_ to 2_common_text_commands.md
Sagar2366 Apr 9, 2025
ecb2196
Update 2_common_text_commands.md
Sagar2366 Apr 9, 2025
c77411f
Update 2_common_text_commands.md
Sagar2366 Apr 9, 2025
3d91d2f
Create 3_extended_grep.md
Sagar2366 Apr 9, 2025
f858b9d
Create 4_awk_sed.md
Sagar2366 Apr 9, 2025
b578e88
Create 5_locate_find.md
Sagar2366 Apr 9, 2025
9a9e94b
Update and rename 3_extended_grep.md to 3_grep_egrep.md
Sagar2366 Apr 9, 2025
4eaf5f6
Update 3_grep_egrep.md
Sagar2366 Apr 9, 2025
9757f1c
Update readme.md
Sagar2366 Apr 9, 2025
a8b5740
Update readme.md
Sagar2366 Apr 9, 2025
70504c5
Delete DailyChallenges/Season2/Linux/Install Linux.txt
Sagar2366 Apr 11, 2025
eea9a4d
Delete DailyChallenges/Season2/Linux directory
Sagar2366 Apr 11, 2025
6c4981d
Create readme.md
Sagar2366 Apr 11, 2025
d1151cc
Create readme.md
Sagar2366 Jul 6, 2025
dd05037
Create Day1.md
Sagar2366 Jul 6, 2025
630c088
Update Day1.md
Sagar2366 Jul 6, 2025
f218789
Create challenge.md
Sagar2366 Aug 18, 2025
d593665
Update challenge.md
Sagar2366 Aug 18, 2025
111eaf3
Create challenge.md
Sagar2366 Aug 19, 2025
0805e51
Delete DailyChallenges/Season2/Dsy14 directory
Sagar2366 Aug 19, 2025
dba21ba
Create challenge.md
Sagar2366 Aug 19, 2025
ac6a314
Added challenge for day 15 with networking fundamentals
Swayam-Prakash-Bhuyan Aug 22, 2025
c0b6879
Added footer for required links
Swayam-Prakash-Bhuyan Aug 22, 2025
0fe469a
cleaned spelling mistakes
Swayam-Prakash-Bhuyan Aug 22, 2025
837354b
Merge pull request #26 from Swayam-Prakash-Bhuyan/feature/swayam-cont…
Sagar2366 Aug 24, 2025
761a7ef
added day 16 challenge
Swayam-Prakash-Bhuyan Aug 25, 2025
5b28bbd
Merge pull request #27 from Swayam-Prakash-Bhuyan/feature/swayam-cont…
Sagar2366 Aug 25, 2025
d0a651a
day 17 added
Swayam-Prakash-Bhuyan Aug 28, 2025
bb99879
Update challenge with lab setup.md
Swayam-Prakash-Bhuyan Aug 28, 2025
ea3f154
Merge branch 'Sagar2366:main' into feature/swayam-contribution
Swayam-Prakash-Bhuyan Aug 28, 2025
208502a
spelling mistakes changed
Swayam-Prakash-Bhuyan Aug 28, 2025
0ebc7ad
challenge 18 added
Swayam-Prakash-Bhuyan Aug 31, 2025
11c6215
Merge branch 'feature/swayam-contribution' of https://github.com/Sway…
Swayam-Prakash-Bhuyan Aug 31, 2025
a0f20ae
theory added challenge 18
Swayam-Prakash-Bhuyan Aug 31, 2025
7a387fb
Update challenge.md
Sagar2366 Sep 5, 2025
3d72b00
Update challenge.md
Sagar2366 Sep 5, 2025
e5b6155
Merge branch 'Sagar2366:main' into feature/swayam-contribution
Swayam-Prakash-Bhuyan Sep 5, 2025
ec51827
Update challenge.md
Sagar2366 Sep 6, 2025
4a7f26d
Merge branch 'Sagar2366:main' into feature/swayam-contribution
Swayam-Prakash-Bhuyan Sep 6, 2025
8275c40
Update challenge.md
Swayam-Prakash-Bhuyan Sep 6, 2025
b68065d
Merge pull request #29 from Swayam-Prakash-Bhuyan/feature/swayam-cont…
Sagar2366 Sep 6, 2025
a3ea7d6
Delete submission_tracker.md
Sagar2366 Sep 7, 2025
e8d62e7
Update challenge.md
Sagar2366 Sep 7, 2025
39e390a
Update challenge.md
Sagar2366 Sep 9, 2025
543d2c4
Create challenge.md
Sagar2366 Sep 9, 2025
7032c7d
Create challenge.md
Sagar2366 Sep 10, 2025
571af8e
Update challenge.md
Sagar2366 Sep 10, 2025
e6be4bb
Update challenge.md
Sagar2366 Sep 10, 2025
0c2521a
Update 13_authorization_in_kubernetes.md
Sagar2366 Sep 12, 2025
e1f40da
Update 10_authentication_in_kubernetes.md
Sagar2366 Sep 12, 2025
2e44e89
Create 14_helm.md
Sagar2366 Sep 13, 2025
527ef2b
Update 14_helm.md
Sagar2366 Sep 13, 2025
f273272
Create 15_kustomize.md
Sagar2366 Sep 14, 2025
339a414
Update 15_kustomize.md
Sagar2366 Sep 14, 2025
a3d46db
Update 15_kustomize.md
Sagar2366 Sep 15, 2025
71e97bd
Update 15_kustomize.md
Sagar2366 Sep 15, 2025
64c6e54
Update 15_kustomize.md
Sagar2366 Sep 15, 2025
98c1015
Update 15_kustomize.md
Sagar2366 Sep 15, 2025
3709c89
Create 16_extension_interfaces.md
Sagar2366 Sep 15, 2025
59f0567
Create answers.md
Sagar2366 Sep 27, 2025
3ca46c9
QOTD - Answers
Sagar2366 Sep 27, 2025
7424d4e
QOTD - Answers
Sagar2366 Sep 27, 2025
3ddf2de
QOTD - Answers
Sagar2366 Sep 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/day7-challenge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy Snake Game to EC2

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Deploy to EC2
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
# Update system packages
sudo apt update -y
sudo apt install -y python3 python3-pip python3-venv git

# Remove old directory if it exists
sudo rm -rf season2-snake_game

# Clone fresh
git clone https://github.com/Sagar2366/season2-snake_game.git
cd season2-snake_game
ls -al

# Set up a virtual environment
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
sudo nohup python3 app.py > snake_game.log 2>&1 &

echo "✅ Snake Game deployed successfully!"
2 changes: 1 addition & 1 deletion CKA/10_authentication_in_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ kubectl certificate approve myuser
# Retrieve the Signed Certificate
After approval, the CSR object will have the signed certificate included in its status. You can extract the certificate from the CSR object:
```
kubectl get csr username-csr -o jsonpath='{.status.certificate}' | base64 --decode > myuser.crt
kubectl get csr myuser -o jsonpath='{.status.certificate}' | base64 --decode > myuser.crt
```

# Create role and rolebinding
Expand Down
66 changes: 58 additions & 8 deletions CKA/13_authorization_in_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Kubernetes [authorization](https://kubernetes.io/docs/reference/access-authn-aut

# Authorization modes
```
1. AlwaysAllow
2. AlwaysDeny
3. ABAC (attribute-based access control)
4. RBAC (role-based access control)
5. Node
6. Webhook
1. AlwaysAllow → every request allowed (testing only).
2. AlwaysDeny → every request denied (testing only).
3. ABAC → Attribute-Based Access Control (legacy).
4. RBAC → Role-Based Access Control (most common in prod).
5. Node → kubelet authorizations to API server.
6. Webhook → delegate to external service (OPA, SSO, custom APIs).
```

# Using [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) Authorization
Expand All @@ -20,7 +20,7 @@ To enable RBAC, start the API server with the --authorization-mode flag set to a
kube-apiserver --authorization-mode=Example,RBAC
```

RBAC helps with:
RBAC helps with: [Who (Subject) can do What (Verb) on Which (Resource)]
1. Establishing a system for <b>users with different roles</b> to access a set of Kubernetes resources.
2. Controlling </b>processes running in a pod and the operations</b> they can perform via Kubernetes API.
3. Limiting the visibility of certain resources per namespace
Expand Down Expand Up @@ -65,7 +65,24 @@ RBAC consists of three key building blocks.
kubectl get serviceaccounts
kubectl describe serviceaccount build-bot
kubectl run build-observer --image=alpine --restart=Never --serviceaccount=build-bot
```
```


### Understanding ServiceAccount Token Generation and Authorization
```mermaid
flowchart TD
P[Pod with serviceAccountName] --> SA[ServiceAccount object in namespace]
SA --> ST[Secret or Token request API]
ST --> T[Token generated for ServiceAccount]
T --> M[Token mounted into Pod filesystem at /var/run/secrets/kubernetes.io/serviceaccount]
M --> R[Pod process sends API request to kube-apiserver with Bearer token]
R --> KAS[Kube API Server]

KAS -->|Token verified against ServiceAccount and bound Role/ClusterRole| AUTHZ[Authorization Check]

AUTHZ -->|Allowed| OK[Request succeeds]
AUTHZ -->|Denied| FAIL[Request fails with 403 Forbidden]
```
# Understanding [RBAC API Primitives](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
The RBAC API declares four kinds of Kubernetes object: Role, ClusterRole, RoleBinding and ClusterRoleBinding.
## Role and ClusterRole
Expand All @@ -83,6 +100,39 @@ The RBAC API declares four kinds of Kubernetes object: Role, ClusterRole, RoleBi
- <b>Alternatively, a RoleBinding can reference a ClusterRole and bind that ClusterRole to the namespace of the RoleBinding. If you want to bind a ClusterRole to all the namespaces in your cluster, you use a ClusterRoleBinding.</b>
- ClusterRoles are cluster-scoped, you can also use them to grant access to: cluster-scoped resources (like nodes), non-resource endpoints (like /healthz), namespaced resources (like Pods), across all namespaces.

```mermaid
flowchart TB
U1[User: sagar]
SA1[ServiceAccount: build-bot]

subgraph Namespace: dev
R1[Role: pod-reader get list watch pods]
RB1[RoleBinding bind Role to User]
CRB1[RoleBinding bind ClusterRole to User in dev]
end

subgraph Cluster
CR1[ClusterRole: cluster-admin\nfull access]
CRB2[ClusterRoleBinding bind ClusterRole to ServiceAccount cluster-wide]
end

%% RoleBinding with Role
U1 --> RB1
RB1 --> R1
RB1 -->|namespace limited| Pods[Pods in dev]

%% RoleBinding with ClusterRole
U1 --> CRB1
CRB1 --> CR1
CRB1 -->|still limited to dev| PodsDev[Pods in dev]

%% ClusterRoleBinding with ClusterRole
SA1 --> CRB2
CRB2 --> CR1
CRB2 -->|cluster-wide| PodsAll[All Pods]
CRB2 -->|cluster-wide| Nodes[All Nodes]

```
### Kubernetes defines a set of [default user-facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles): cluster-admin, admin, edit, view and [core-component roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#core-component-roles).

1. Roles management
Expand Down
Loading