This post is sponsored by Kuberneteslab. Kuberneteslab helps startups to manage the horizontal layer of the application lifecycle. It includes DevOps + BCP + App modernization.

In this article we will look into some commands to get resources from Kubernetes cluster using Kubectl.

To get the resource of particular type:

To get pod:

$ kubectl get pod -n namespace

To get deployment:
$ kubectl get deployment -n namespace

To get replicasets:
$ kubectl get replicaset -n namespace

To get service:
$ kubectl get service -n namespace

To get persistent volume:
$ kubectl get pv -n namespace

To get from all namespaces :
$ kubectl get po -A

You can use -A option with rest of Kubernetes object too.

To get all resources from all namespaces:
$ kubectl get all -A

I have done the analysis of the operating margin with the financial results from three major companies in Japan.

Rakuten Inc: The company shows a consistent positive operating margin for the Year 2018 & 2019. However, the company’s operating income was reduced due to heavy investment in the telecom sector.

Z-Holdings Inc: Z-holdings is an outperformer for competition in the eCommerce and digital payment industry. It holds digital payments as PayPay in Japan and as well Yahoo! Japan eCommerce business.

Mercari Inc: A startup company based in the US and majorly operates in the US & Japan. Its business is in eCommerce and digital payment in Japan. After losses in operating income for 2018 & 2019 Mercari Inc has shown a positive outcome in the Year 2020.

This article is published by kuberneteslab. If you want to see other 1m read articles then please check this link.

In shared linux server environment it is important to track the usage of high CPU consuming processes.

If you are administrator then following command is useful to check top 10 CPU consuming processes on linux:

$ ps aux | sort -nrk 3,3 | head -n 10

It will give you result of the top 10 cpu consuming process.

This is 1m read article written by Kuberneteslab. In this article we will discuss about the keep action for keeping certain metrics in Prometheus and dropping everything else.

Prometheus provides rich features like dropping the metrics and keeping the metrics which can specified under job configuration.

To keep the specific metric:

__name__ indicates the metric name by default. With the config above for job-1 it will scrape only metrics which are matching regex provided in configuration.

Metric relabeling is applied to samples as the last step before ingestion. Make sure the configuration uses “metric_relabel_configs”.

Kuberneteslab aims to write open-source blogs. We would like to have useful information be in one place. If you like our work then please donate us to support.

Prometheus does provide many configs for service discovery. It’s very easy to discover the targets from consul, kubernetes & mesos, etc.However, there are certain use cases where we maybe need to add static configs. With growing infrastructure and monitoring targets, it may be possible that the static configs will become…

Jakir Patel

MBA & Computer Science.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store