This Kubernetes cheat sheet is designed for the one who has interested and learning about the file management and using Kubernetes as a tool, then this sheet will be a handy reference sheet. Don’t worry if you are a beginner and have no idea about how Kubernetes works, this Kubernetes cheat sheet will give you a quick reference of the basics that you must know to get started.
Prepare yourself for the Top DevOps Interview Questions And Answers!
Kubernetes is an open source platform used in order to automate the deployment and to scale the containers across the clusters of hosts providing container centric infrastructure.
Become Master of DevOps by going through this online DevOps training in London.
Now let’s discuss the key points of this architecture.
Now let’s understand the role Master and Node play in the Kubernetes Architecture.
Go through the Best DevOps Course in New York to get clear understanding of DevOps.
Also called as minion, it contains the services necessary to run the pods that are managed by the master.
Learn more about DevOps in this DevOps training in Sydney to get ahead in your career!
|Kubectl get pods||Lists all current pods|
|Kubectl describe pod<name>||Describes the pod names|
|Kubectl get rc||List all replication controllers|
|Kubectl get rc –namespace=”namespace”||Lists replication controllers in namespace|
|Kubectl describe rc <name>||Shows the replication controller name|
|Kubectl get cvc||Lists the services|
|Kubectl describe svc<name>||Shows the service name|
|Kubectl delete pod<name>||Deletes the pod|
|Kubectl get nodes -w||Watch nodes continuously|
|Execute command on service by selecting container.||Kubectl exec<service><commands>[-c< $container>]|
|Get logs from service for a container||Kubectl logs -f<name>>[-c< $container>]|
|Watch the kubelet logs||Watch -n 2 cat/var/log/kublet.log|
|Show metrics for node||Kubectl top node|
|Show metrics for pods||Kubectl top pod|
|Get version information||Kubectl version|
|Get cluster information||Kubectl cluster-info|
|Get the configuration||Kubectl config g view|
|Output info about a node||Kubectl describe node<node>|
Interested in becoming DevOps Expert? Click here to learn more in this DevOps Course in Toronto!
Some common objects used:
|cm= conf gmaps||controllerrevisions||crd=custom resource definition|
|Cronjobs||cs=component statuses||csr= certificate signing requests|
|Deploy=deployments||ds= daemon sets||ep=end points|
|ev= events||hpa= horizontal pod autoscaling||ing= ingress|
|jobs||limits=limit ranges||Netpol- network policies|
|No = nodes||ns= namespaces||pdb= pod distribution budgets|
|po= pods||Pod preset||Pod templates|
|Psp= pod security policies||Pv= persistent volumes||pvc= persistent volume claims|
|quota= resource quotas||rc= replication controllers||Role bindings|
|roles||rs= replica sets||sa= service accounts|
|sc= storage classes||secrets||sts= stateful sets|
Interested in getting an industry-recognized certification in DevOps? Enroll in Intellipaat’s DevOps Course in Bangalore now!
Additionally, we do have some quick commands that are used often:
|Launch a pod with a name an image||Kubectl run<name> — image=<image-name>|
|Create a service described in <manifest.yaml>||Kubectl create -f <manifest.yaml>|
|Scale replication counter to count the number of instances||Kubectl scale –replicas=<count>rc<name>|
|Map external port to internal replication port||Expose rc<name> –port=<external>–target-port=<internal>|
|To stop all pod in <n>||Kubectl drain<n>– delete-local-data–force–ignore-daemonset|
|To create namespace||Kubectl create namespace <namespace>|
|Allow master nodes to run pods||Kubectltaintnodes –all-node-role.kuernetes.io/master-|
Now, you know the most important skill set of a DevOps Engineer. But, do you know, DevOps Engineers are among the highest paid professionals in the technology domain? so join DevOps training in Hyderabad!
Get in touch with Intellipaat for a comprehensive DevOps Training and be a certified DevOps Engineer!
We have covered all the basics of Kubernetes in this cheat sheet. If you want to start learning DevOps in depth then check out the DevOps Certification by Intellipaat.
Not only will you get to learn and implement Kubernetes with a step by step guidance and support from us, but you will also get to learn other important topics in DevOps such as Docker, Chef, Git/GitHub, Ansible, Jenkins, Puppet, Selenium, Nagios and many more. You will also get 24*7 technical support to help you with any and all your queries, from the experts in the respective technologies here at intellipaat throughout the certification period. So, why wait? Check out the training program and enroll today!Previous Next
Download Interview Questions asked by top MNCs in 2019?