start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
read name | |
echo "Hello, $name Good to see you here!!" | |
sleep 2 | |
echo "Count down start ..." |
#!/bin/python3 | |
try: | |
x = int(input()) | |
y = int(input()) | |
z = x + y | |
print(z) | |
except ValueError: | |
print("Enter the correct numeric value. ") | |
except SyntaxError: |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello, Go Programmer!!") | |
} | |
Tools
Presentations
##################### 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 |
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 |