Kubernetes: Tips And Tricks For Making The Most Of Kubernetes — LinuxTechLab

Kubernetes is one of the greatest revelations in container technology of recent years. For any company looking to create large-scale and widely-available containers, Kubernetes is a great feature-rich and easy to use option. Even for those who have been won over to the applications of Kubernetes, there are still some underused features that will amplify your experience and help you make the most of this invaluable technology. Here are some Kubernetes Tips and Tricks.

Recommended Read: Understanding Kubernetes etcd
Also Read: The (in)complete Guide To DOCKER FOR LINUX

Kubernetes Tips & Tricks

Let Bash Do The Work For You

Cleaning Up After You

-eviction-hard =memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%

Pushing To The Limits

apiVersion: v1 kind: LimitRange metadata: name: mem-limit-range spec: limits: — default: memory: 512Mi defaultRequest: memory: 256Mi type: Container

Localizing Your Clusters

If, however, you want your images pushed by your docker build to a local cluster, run this command:

$ eval $(minikube docker-env)

Restricting Access

Label Everything

Labels are particularly powerful on Kubernetes Go, a useful little client that’s highly customizable. As the name suggests, this client has its origins in GO, and it’s suitable for everything from deployment engines to clean-up applications.

Pod Disruption Budgets (PDB)

apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: app-a-pdb spec: minAvailable: 2 selector: matchLabels: app: app-a

Keep an eye on minAvailable and matchLabels: these elements let you control your concurrently running instances. Add to your minAvailable to drain more Nodes and to your matchLabels to multiple deployments. So these were some of the Kubernetes Tips & Tricks, please do also share your tips & tricks using the comment box below.

Beatrix Potter works as a tech blogger at Academic writing service. She specializes in container technology, including Docker and Kubernetes, but also writes about web development and app building. She also likes baking sourdough bread and knitting.

If you think we have helped you or just want to support us, please consider these:-

Linux TechLab is thankful for your continued support.

Originally published at https://linuxtechlab.com on April 1, 2020.

http://linuxtechlab.com is a beginner friendly website where you can learn Linux Tips & tricks,Scripting, also has lots of tutorials aimed at making Linux easy.