Certified Kubernetes Administrator
-----------------------------------------------------------
kubernetes tutorial | Tips and Tricks | Linux Bash | Cursor Column, Alias, Auto Completion, Yaml
Description
------------------------
In this video, you are going to Some of the Tips and Tricks while working with the kubernetes environment. we are also going to see a demo on each of those as well.
Kubernetes Tips and Tricks
--------------------------------------------
Tip 1 - Indentation & Cursor Column for YAML files
Tip 2 - Autocompletion - kubectl commands
Tip 3 - Alias for kubectl utility
Tip 4 - Creating Kubernetes YAML manifest
For suggestions/feedback/doubts contact
email: [email protected]
Happy Learning !!!
============================================================
USEFUL LINKS
----------------------------
API References:
https://kubernetes.io/docs/reference/...
Kubectl Command Reference:
https://kubernetes.io/docs/reference/...
Kubernetes Cheat Sheet
https://kubernetes.io/docs/reference/...
============================================================
#vsparkz #kubernetes #k8s #containers
DEMO STEPS
-------------------------
*** $ - Notation to represent a command
Tip 1 - Indentation & Cursor Column for YAML files
--------------------------------------------------------------------------------------
$ kubectl run nginx --image=nginx --dry-run=client -o yaml
Copy the output of the above command and create a file pod.yaml
Install VIM Editor...
$ yum install vim
$ vim .vimrc
Copy the below contents in .vimrc file...
$ set ts=2 et cursorcolumn
$ source .vimrc
$ vim pod.yaml
Tip 2 – Bash Auto Completion - kubectl commands
-----------------------------------------------------------------------------------------
Install bash completion package (Optional)...
$ yum install bash-completion
Copy the below command in bash-completion.txt
$ kubectl completion bash
$ source bash-completion.txt
Copy the above commands in .bashrc file
Tip 3 - Alias for kubectl utility
----------------------------------------------------------
$ alias k=kubectl
$ complete -o default -F __start_kubectl k
Copy the above commands in .bashrc file
Check the alias for k...
$ type k
Tip 4 - Creating Kubernetes YAML manifest
-------------------------------------------------------------------------
Create a Simple yaml definition file
Create a Pod Template
$ kubectl run nginx --image=nginx --dry-run=client -o yaml
Copy the output of the above command and create a file pod.yaml
Create a Deployment Template
$ kubectl create deployment frontend --image=nginx --replicas=1 --dry-run=client -o yaml
Copy the output of the above command and create a file deployment.yaml
Create a complex yaml definition file
$ kubectl api-resources
$ kubectl explain pods
$ kubectl explain pods --recursive
-- THE END --
Смотрите видео kubernetes tutorial | Tips and Tricks | Linux Bash | Cursor Column, Alias, Auto Completion, Yaml онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь VSPARKZ 01 Ноябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,319 раз и оно понравилось 17 людям.