Skip to content

Instantly share code, notes, and snippets.

kubectl commands and tips&tricks for CKA, CKAD and CKS exams

Quickly retrieve imperative commands to create k8s resources.

Command: k run -h | grep '# ' -A2

When is it useful: copy/paste command to notepad, edit values and execute to create desired resource

Result: list of different ways to create k8s resources imperatively using kubectl

@kamaok
kamaok / nginxproxy.md
Created October 15, 2021 08:39 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@kamaok
kamaok / vagrant-cheat-sheet.md
Created October 15, 2021 08:33 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@kamaok
kamaok / tmux-cheatsheet.markdown
Created October 15, 2021 08:32 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname