Skip to content

Instantly share code, notes, and snippets.

View omps's full-sized avatar

Om Prakash Singh omps

View GitHub Profile
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
1. Worker node is connected but doesn't have any role defined.
```
kubectl label node k8s-node1 node-role.kubernetes.io/worker=worker
```
@omps
omps / questions.md
Last active March 4, 2025 10:38
CKAD Questions

Kubernetes Practice questions

Core Concepts

  1. Create a namespace called 'mynamespace' and a pod with image nginx called nginx on this namespace
  2. Create the pod that was just described using YAML
  3. Create a busybox pod (using kubectl command) that runs the command "env". Run it and see the output
  4. Create a busybox pod (using YAML) that runs the command "env". Run it and see the output
  5. Get the YAML for a new namespace called 'myns' without creating it
  6. Create the YAML for a new ResourceQuota called 'myrq' with hard limits of 1 CPU, 1G memory and 2 pods without creating it
  7. Get pods on all namespaces
  8. Create a pod with image nginx called nginx and expose traffic on port 80
https://www.reddit.com/r/kubernetes/comments/ssxhsd/cleared_my_cka_exam_with_a_score_of_92_here_are_a/?chainedPosts=t3_rzpu5i
@omps
omps / simple_mta.md
Created September 5, 2022 15:49 — forked from n3dst4/simple_mta.md
Using Postfix as an MTA so that local mail on a linux box gets delivered to somewhere useful

Simple Postfix MTA Setup for headless hobbyists

So, you're a hobbyist or maybe even a user in a small-scale business capacity and you have some kind of headless Linux (or other *nix) box, maybe it's a VPS or a Raspberry Pi, and you want it to be able to email you with alerts (setting up monitoring is a separate subject!)

History

I went round in circles with this for a while, because it seemed like such a

@omps
omps / wincmd.md
Last active January 22, 2022 13:53
A Gist of Windows Commands for Linux Admins

Windows Docker Kubernetes Commands for Linux Admins

1.a. Find windows system path on windows terminal Run path command on any cmd prompt and this should print the path output, tested on windows 10

D:\> path

1.b. Find and temporarily modify windows system path on powershell windows 10

PS D:\> $env:Path
@omps
omps / deleteWordbefore
Last active January 22, 2022 06:39
Visual Studio Code - Ctrl + Backspace set to deleteWordBefore
Based on the latest comment https://github.com/microsoft/vscode/issues/68167 I have modified JerryGoyal's answer so we don't have to modify bindings:
Put the following at the top of your Microsoft.PowerShell_profile.ps1 config file (type $profile in the terminal to find it, you might have to create one if it doesn't exist already)
```PowerShell_profile
if ($env:TERM_PROGRAM -eq "vscode") {
Set-PSReadLineOption -EditMode Emacs
}
This works for me (vscode 1.43)
@omps
omps / unfollow.js
Created August 30, 2020 16:58 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
jekyll on different port
jekyll serve --port 4001 --host my_hostname_or_ip
affilaite theme for jekyll
https://github.com/omps/affiliates-jekyll-theme
@omps
omps / README.md
Created March 30, 2019 18:33 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.