Skip to content

Instantly share code, notes, and snippets.

View Tej-Singh-Rana's full-sized avatar
🎯
Focusing and hiding in the cloud with programming. ☁

Tej Singh Rana Tej-Singh-Rana

🎯
Focusing and hiding in the cloud with programming. ☁
View GitHub Profile
CKAD
Core Concepts (13%)
kubectl create namespace mynamespace
kubectl run nginx --image=nginx --restart=Never -n mynamespace
kubectl run nginx --image=nginx --restart=Never --dry-run -o yaml > myfile.yaml
kubectl run busybox --image=busybox --command --restart=Never -it -- env #withoutput
kubectl run busybox --image=busybox --command --restart=Never -- env #with
kubectl logs busybox
kubectl run busybox --image=busybox --restart=Never -o yaml --dry-run --command env > myfile.yaml
kubectl apply -f myfile.yaml
@Tej-Singh-Rana
Tej-Singh-Rana / gist:5c4c0221ef75d80c4ea980f94335c0cb
Created August 12, 2020 15:43
kubernetes cluster installation from kubeadm-way
##################### Master Node ##################################################
# Set the hostname
$ hostnamectl set-hostname <enter-hostname>
# To get effect in the system without reboot, run the following command:
$ exec bash
# Do entry in the /etc/hosts for master and worker nodes to identify by it's hostname.
e.g. echo "172.16.238.10 master" >> /etc/hosts
echo "172.16.238.11 worker01" >> /etc/hosts
@Tej-Singh-Rana
Tej-Singh-Rana / tmux-cheatsheet.markdown
Created April 28, 2020 16:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
package main
import "fmt"
func main() {
fmt.Println("Hello, Go Programmer!!")
}
#!/bin/python3
try:
x = int(input())
y = int(input())
z = x + y
print(z)
except ValueError:
print("Enter the correct numeric value. ")
except SyntaxError:
@Tej-Singh-Rana
Tej-Singh-Rana / code.sh
Created March 9, 2020 18:55
First Code
#!/bin/bash
read name
echo "Hello, $name Good to see you here!!"
sleep 2
echo "Count down start ..."