We are excited to announce the launch of Replex’s Kubernetes Governance and Cost management solution for the modern cloud-native enterprise.
Replex allows IT managers and DevOps teams to regain control over their Kubernetes environments and drive cost and resource efficiency, accountability and transparency across their organizations. It does this by providing the tools required to support Kubernetes with a comprehensive Governance and Cost Management framework.
The adoption of cloud-native technologies has done wonders for enterprise agility and flexibility. Deployment acceleration is one of the top-most cited outcomes of adopting cloud-native technologies, closely followed by scalability and portability.
However, the introduction of these technologies has also coughed up new challenges — due to the decentralization of IT infrastructure in this new world, governance and cost management now require a completely new approach.
IT managers no longer have the same degree of control over resource provisioning they once did. Development (and production) environments tend to blow up because of the fact that DevOps can provision resources with minimal oversight from management. In addition, IT managers no longer have the visibility and insights they require to understand how well their environments are performing. This is true of the underlying infrastructure layer as well as across developer and operations teams.
The shared nature of Kubernetes resources means that IT managers, in addition to losing control over resource provisioning, no longer have visibility into who owns what resources, how many resources they consume, and what that consumption will cost them. Policy and compliance are also stretched to their limits when DevOps teams have to work on multiple abstraction and infrastructure layers to consistently enforce governance policies.
Replex works across multiple abstraction layers and technologies to provide a central place for insights into cluster costs and performance, the ability to optimize this performance, as well as to manage and enforce governance policies.
It helps enterprises tackle all of these challenges and more for production Kubernetes environments. Replex ensures that IT managers and those tasked with finance and infrastructure cost management regain control and gain visibility into their environments without making any tradeoffs on agility or flexibility.
Let’s now dig into how you can deploy Replex in your own Kubernetes environment.
The Replex agent is extremely light-weight and has a minimal footprint. Installation leverages native Kubernetes objects and is quick and easy: You can be up and running in a matter of minutes.
Before getting started make sure there is a Kubernetes cluster up and running. The installation also requires Kubectl to be installed.
Note: The installation below is meant as an example to get an idea of the workflow involved. Get in touch with us to deploy Replex in your production Kubernetes clusters.
To install Replex using yaml, create a configuration file named replex-agent.yaml and copy the following CronJob spec into it:
apiVersion: batch/v1beta1 kind: CronJob metadata: name: replex-agent-cronjob labels: app: replex-agent spec: schedule: placeholder jobTemplate: spec: template: spec: containers: - name: replex-agent # this image tag is a default value and might be replaced in code image: $docker_registry_url$/replex/replex-agent:latest imagePullPolicy: Always volumeMounts: - name: replex-agent-config mountPath: /etc/replex readOnly: true restartPolicy: OnFailure volumes: - name: replex-agent-config secret: secretName: replex-agent-config
Create the CronJob from the file replex-agent.yaml using:
kubectl create -f replex-agent.yaml
This will create a Kubernetes CronJob which runs periodically.
Next, we need to set up a configuration with credentials for the Replex server and for metrics and Kubernetes providers. We do this with a Kubernetes Secret spec:
apiVersion: v1 kind: Secret metadata: name: replex-agent-config labels: app: replex-agent type: Opaque data: | replex-agent.conf: metrics: disabled: false providers: - provider: Prometheus url: http://prometheus.example.com:8080 username: exampleuser password: secret kubernetes: disabled: false providers: - provider: EC2 auth: "service-token" account_alias: EC2 K8s config_file: ec2-kube-config.yaml
The spec contains a URL and optional username and password for Prometheus. It also contains a service account and a kubeconfig with the service-account token. Make sure to replace these with the ones matching your environment.
Create the spec using:
kubectl create -f replex-secret.yaml
Let’s now take a look at a couple of screenshots from the Replex Kubernetes dashboard.
The screenshot above shows us the total monthly costs for the underlying infrastructure provider- AWS in this case. There is also an efficiency section which shows the overall utilization for each individual resource: CPU, RAM and Disk. The cost allocation section shows an overview of how much costs are incurred by individual Namespaces and teams.
We can also dig in further to see individual costs for namespace or teams. The screenshot above is the Namespace cost allocation view. On the top, you can see two graphs which show the total allocated monthly and daily costs.
Below the graphs is the Namespace view which shows the total costs for each individual Namespace. Costs are broken down by resource type (CPU, RAM and Storage) for each Namespace.
The namespace section also shows the total amount of CPU memory and Storage resources requested by each Namespace. Requested resources are further broken down into used and unused resources.
You can also seamlessly switch to the teams view, which breaks down Kubernetes costs by team.
Interested in taking Replex out for a spin? Get in touch today!
Fan of all things cloud, containers and micro-services!
Replex team was in full attendance at the recently concluded KubeCon 2019 in Barcelona. Here is our take on the numerous talks, presentations and the latest updates from the Kubernetes community.
June 3, 2019
4 min read
A comprehensive guide to Kubernetes in Production. This guide contains best practices, checklists, tutorials and how-to guides for production-ready Kubernetes. We will be updating this page periodically, so stay tuned!
May 2, 2019
4 min read