Definition of Kubernetes Quickstart
In this tutorial, we will discuss more the quick start guide for using Kubernetes, for we may require prerequisite to start the setup of Kubernetes. But before we dive into the setup of Kubernetes let’s first understand what Kubernetes is, it is an open-source platform which helps us to manage and contained service, a workload that enables both for us declarative and automation configuration for us. It is also extensible and portable. Also, we have good support for its tools, service because it is widely available. Also, Kubernetes has the fastest growing ecosystems, in the coming section of the tutorial, we will discuss in more detail the working, implementation, and quick start to setup Kubernetes, al the prerequisite that are required to start with in detail for better understanding and clarity.
Overview of Kubernetes Quickstart
As we have already seen the overviews for Kubernetes in the last section, but before starting first understand the below;
1) We have to have a few prerequisite in place in order to start with the Kubernetes, let’s take key points and steps which are required for key quick start.
2) We need a machine which is running on macOS or Linux.
3) Also before start we require few tools which are as below;
7) gcc compiler
So above tools we require before we start with the Kubernetes, it is an overviews for this w will have closer look at the whole setup in detail in the coming section of the tutorial, for better usage and easy setup of Kubernetes on machine.
Configure SPIRE Server
We need to execute the below sets of commands which are as follows;
1) Create namespaces using the below command;
kubectl apply -f spire-namespace.yaml
2) Verify the namespace by executing the below commands;
kubectl get namespaces
3) configure SPIRE as below;
kubectl apply \
-f server-account.yaml \
-f spire-bundle-configmap.yaml \
Kubernetes Quickstart Configuration file format
Now in this section we will discuss in more detail the format that we have to follow once we start the setup for Kubernetes on our machine, we have to maintain a configuration file that should follow the below points, let’s have a closer look at it;
1) First when we are trying to define the configure file we have to specify the stable version of the API which is needed.
2) After this we should store our configuration file in the version control, before we trying it to push to cluster. This will enable us and help us to easily and quickly revert the changes if we want to. This also helps us to aids the cluster restoration and re-creation.
3) We can write our configuration file using any of the formats such as JSON or YAML, but always recommended to use YAML rather than JSON, because YAML format is more readable and user-friendly also. But both of these formats that is JSON and YAML can be used interchangeably.
4) We should always try to group the related objects inside the single file, to inverse the readability, because we can easily maintain one file, tan to look for several files.
5) Also look for kubectl commands, which can be called directly from the directory.
6) Try to avoid the initialization of variable with the default values, because it will unnecessary cause the error, file should be with minimal configuration, this will make it less error-prone.
7) Also give objects descriptions using the annotations, it will allow and enable better introspection for us.
We have looked at the sample configuration file, which can help you to set up your own configuration file see below;
apiVersion: veriosn here
name: your name
app: your name
tier: your name
- port: your port 6379
targetPort: your port 6379
app: same as above
tier: same as above
role: same as above
Download the Install Delegate
In this section, we will going to see the installation of Delegate and will try to launch it to the cluster. For this, we have to follow a few steps let’s take a closer look at it,
1) First step is to login in to Harness.
2) W will have Harness manager, click on the Setup, here we will configure our micro services, deployment, pipelines, building blocks, resources, etc. for the pipelines.
3) Now click on the Harness Delegate.
4) Click on the Delegate download, after that click on the Kubernetes YAML file, here you will see the Delegate settings.
5) Name you can give as – k8s-delegate exactly same.
6) We will choose the Primary Profile.
7) Now download it, you can see Kubernetes Delegate, its YAML file, all the README you can see this now on your computer archive.
8) Open command prompt and try to ma the Delegate path on your machine.
9) Now extract the folder that we have downloaded, after that navigates to the harness-delegate-kubernetes folder that we have extracted just now.
Create a Harness Application and Service
Follow below steps to create Application and Service;
1) First click on the create Application in the Harness configuration, below popup will appear.
2) Enter name of your application, you want and Submit it.
3) Application will get created.
1) Click on Service, in the popup adds the Service.
2) Fill all the details such as Name, Description, and Type, etc.
3) Click Submit to create your Service.
4) It will create the Service for you.
Your Target Kubernetes Cluster
By the use of this, we can represent our infrastructure like, dev, production, QA, Stage, etc. Use below steps to configure this;
1) Breadcrumb will navigate you to Environments.
2) Here we can add Environments, Fill in the details such as Name, Description type, etc.
3) Click Submit to add Environment.
4) Now go to infrastructure Settings and provide details like, Name, Description, Type, Release Name, etc.
5) Submit it.
Conclusion – Kubernetes Quickstart
As we have seen all the steps and format for the file also to setup our Kubernetes on our machine follow whole article and steps to get a better understanding and clarity, also it is easy to setup if we try to follow the steps as it as mentioned.
This is a guide to Kubernetes Quickstart. Here we discuss the definition, overviews, Configuration file format examples with code implementation. You may also have a look at the following articles to learn more –