NashTech Blog

Table of Contents
ethnic young woman using laptop while having tasty beverage in modern street cafe

Before moving to , How we can build infrastructure using crossplane. Lets see first what is crossplane in details. Why should we use that.

Introduction

So what exactly the cross plan is? Before going to the cross plane, we know that in the recent days that we are trying to more focusing on automating our cloud infrastructure, right ? Why exactly we are trying to do the automation of the infrastructure, is that the most organisations are following like cloud. We are performing the cloud adoptions. So in so for this kind. For this reason we are exactly trying to automate our infrastructure.

The infrastructure could be any like a AWS , Azure and any other cloud provider we can say. As we know that there are many different tools to perform or manage those infrastructure like the most we know and use this terraform. There would be hard to choose that which tool or which technology to use for the automating the infrastructure. So there is an the latest option that we can see is the CrossPlane.

Close plane is like an add on feature. So crossplane is an add on to the Kubernetes but with the help of which we can automate our infrastructure it means that just like the terafrom as we can create our intra by writing the same code the same way we can use the cross plane and we can write the manifest file in the Kubernetes and we can create our infrastructure with the help of it. Means we can say the cross plan is an add on feature to the kubernetes.

Basically the cross plan is created by the upbound in the 2018 and after that it is also accepted by the CNCF. So now we can use the cross plan to create our infrastructure and automate our infrastructure so you can see.

Crossplane Flow Diagram

 

This diagram shows how exactly the crossplane works, so we know that whenever we are going to use the k8 we use kubectl , we execute some of the commands. Let’s suppose we are using some of the libraries or you are like Argo CD. There are some Kubernetes API and extra you can see there is an extra some feature that is workload scheduler, resource controller and external resource controller which are the part of Crossplane. So with the help of those we can actually manage different cloud providers so you can see in the resource controller.

There are some cloud provider which are native and in the External Reserve controller we can say the different service cloud provider like elastic. What is the main purpose of crossplane we can see over here is that ? Basically crossplane is a feature to the Kubernetes. Therefore by writing some files we can create our infrastructure with the help of crossplane. So not only the resources we can also create the cloud resources and the services.

This is the exact idea about the crossplane that what what exactly the crossplane is.

Now you can see as we are using the crossplane, we need to write the manifest file in k8 which is in the YAML format. Crossplane can be considered as a Kubernetes add-on, which means that it makes use of custom resources to provide all of its functionality. There are 4 kinds of resources,

Providers

This is the very first kind of package in crossplane terminology,it means that this is the very first provider we can see it like as in Docker image also. So what exactly it does is it install all the CRD’s that is the custom resource definition for all our services and the resources from the cloud provider. It installed the CRDs for all of the resources and As of today, providers exist for AWS, GCP, Azure, ArgoCD, GitLab, Github, Kubernetes, and many more.

Managed Resource

The second is manage resources.So this is installed by the provider. It means that whenever we are going to create the provider, this kind of resource in our cross plan so it will install all the crds for the managed resources. those are created by the provider.

Configurtaions

The third one is the configuration so we can see this is the second kind of resource in the cross play. It means that whatever the resources you need to create, you need to provide the configuration for those. This is the third kind and the last one is the composite resources. Therefore whenever let’s suppose you have create some managed resources and that,there are some composite resources as well. So you need to specify the cross plane configuration for those.

Composite resources

Exactly. The composite resources are, so the composite resources are group managed resources. It means that let’s suppose you have to create some more complex architecture. In that case you are going to use the composite resources type. So these are the kinds that we need to provide at the time of CrossFit. It depends on your configuration that what kind of resources you want to create, like manage resource or the composite resource. But the first provider you can see over here is the provider.

Why crossplane ?

Why exactly we have to use the crossplane. The very first is a developer friendly API. We know whatever the DevOps engineer are there, they are using the kubernetes. They are all familiar with the K8 API and the k8 platform. So we can say it is a very developer friendly API because everyone knows the Kubernetes and uses the yaml format.

It is an easy language to learn, so this is the main feature that we can say that we can use the crossplane as the developer has friendly.

The second one is the powerful as the crossplane provide most of the provider. As I’ve already mentioned, there are different kinds of provider you can use in the crossplane and create your own infrastructure with the crossplane. So this is the second feature and there are many more providers they are trying to support currently.

The third one is production ready with the assistance of K8s. This is the most important feature that I can say about the crossplane, that why we have to use the cross plane. So as you can see, it says that production production ready, it means that it uses Kubernetes controller and additionally the idea of continuous reconciliation to run the platform. It means If some resource breaks (which it will), Crossplane will examine and change the resource state to desired configuration.

The cross plane will automatically handle those resources and compare the state and create those resources again to match our desire state. That’s why we can call it as a production ready.

Let’s move towards the benefits.

Benifits of crossplane

1. GitOps

As we know that the GitOpss always trying to use the best practises to create your infrastructure and to automate your infrastructure. The main focus of the GITOPS is to follow the best practises. As gitops may be the future in the next few years considering using the cross plane we will able to implement all the best practises of creating the infrastructure so.

Let’s suppose we are not only creating the resources with the help of k8, we are also creating the cloud native resources with the help of crossplane. So it is the most best practise that Github’s follows.This is the one of the benefit and we can say that this allows us to set up an advanced deployment mechanical mechanism. It means that whenever let’s suppose there is an changes occur into our infrastructure.

We don’t have to follow this manual steps. Whatever the crossplane manifest file and configurations are there, we can store them in a git. As we are managing all those infra in the git. So whenever we are going to commit or push the changes to our GitHub repository it will automatically consider the changes and perform the changes into your external infrastructure. You don’t need to follow.

2. Continious Reconsilation

Crossplane helps that we can declaratively manage our infrastructure, like let’s suppose we specify within our code the different properties of your infrastructure resources and what crosslane will do. The cross plan will ensure these are created as defined. It means that the desired state has to be the actual state that we needed. The code with the details of our infrastructure is referred to our desired state. So we can compare those and we can actually reconcile our state of the infrastructure. If there are some changes in the desired state/the desired state is the different from the actual state, it will automatically check all those all those differences and create your infrastructure as per the requirements.

3. Consistency

The third one is the consistency. As I already mentioned that whatever files we have created, we stored them in a git. So let’s suppose in case you want to share your infrastructure with your team mates or the other organisation, you can easily share your repo and they can create their own infra. Instead of creating manual changes into your infrastructure . Therefore you can easily share And manage your infrastructure over there. So there is no need to perform any manual steps. Because of this we can manage the consistency between between your teams and the different organisation as well.

4. Shifting Left

The last feature is the shifting left. As we know creating infrastructure is the role and the responsibility of the DevOps engineers. So whenever we are trying to create the infrastructure the DevOps engineer always perform the major role and create some configuration and write file and create the infrastructure automatically. The shifting left is the process of empowering developers by ensuring they are equipped to participate in the infrastructure creation as well. It means that not only the DevOps engineer has to be able to perform or create your infrastructure. Also the developer has to know that how exactly the infrastructure is created there also able to manage our infrastructure.

Using Crossplane, the DevOps team can define what type of infrastructure resources can be created and then provide the engineering team with examples of those resources. It means that let’s suppose there are some developer which always developer have not that much access so they can access our cloud or reviews console to manage the infrastructure and all. So with the help of crossplane what we can do is that we already return those infrastructure and resources.

Thus, Crossplane makes it easier to empower engineering teams across the organization.

Search

Proudly powered by WordPress

Picture of Sakshi Gawande

Sakshi Gawande

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top