In the exam, you need to maintain a rhythmic speed—that means working fast without wasting steps.
You’ll have to use shortcuts smartly and avoid repeating the same command unnecessarily.
These next 5 minutes could make a huge difference in your exam, so let’s begin.
Many people recommend using imperative commands in Kubernetes — like kubectl run
or kubectl expose
.
While these can be useful for quickly creating a Pod, I personally recommend:
Use imperative only for Pod creation, but for everything else — avoid it.
Why?
Because in the real world and exams, what really helps is:
-
Knowing how to find the correct YAML
-
Editing and understanding it properly
-
Applying declarative files using
kubectl apply -f
So instead of relying on imperative commands, get comfortable with:
-
The official Kubernetes documentation
-
Using
Ctrl + F
+apiVersion
to jump straight to YAML examples -
The Kubernetes cheat sheet (we’ll cover that too)
Mastering how to quickly locate or build YAML files will help you more than memorizing one-liners.
We'll go through this in detail — including tricks to grab YAMLs fast, without scrolling, and how to tweak them for your exam.
Pro Tips
-
If you're in a hurry, search the word
apiVersion
— 99% chance it’s just above the YAML block.
(you should create your own thing so better practice whatever you use) -
Kubernetes rarely gives external
.yaml
files — most YAMLs are inline on the doc page.
Delete Word(s) in Vim
Command | What It Does |
---|---|
dw | Delete from cursor to end of word |
daw | Delete entire word under cursor (including space) |
diw | Delete inner word (just the word, no space) |
d2w | Delete 2 words from cursor |
dW | Delete until end of word (big word — space-separated, not punctuation-based) |
Delete Line(s)
Command | What It Does |
---|---|
dd | Delete the entire current line |
2dd | Delete 2 lines starting from current line |
d$ | Delete from cursor to end of line |
D | Same as d$ (shorthand) |
d0 | Delete from cursor to start of line |
:1,5d | Delete lines from line 1 to 5 |
:.,+3d | Delete current line and next 3 lines |
Delete Inside or Around Text Objects
Command | What It Does |
---|---|
di" | Delete text inside double quotes |
da" | Delete text around double quotes (including quotes) |
di( or di) | Delete inside parentheses |
da( or da) | Delete around parentheses, including them |
Tips for Fast Practice
-
You must be in normal mode (press
Esc
first). -
Use
u
to undo a delete (very handy). -
Use
.
to repeat the last delete (super fast for repeated actions). -
Use line numbers with
:n
commands for bulk deletions.
Comments
Post a Comment