You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can view new created namespace using following command
Another way of creating namespace is as follows:
Delete a namespace with following command
Pods in Kubernates
They can be simply created with the kubctl run command, where you have a defined image on the Docker registry which we will pull while creating a pod.
This can also be done by creating the yaml file and then running the kubectl create command.
Multi container pods are created using yaml file with the definition of the containers.
Implementation of storage class and pvc
Create a storage class using vi editor
Create a storage class using following command:
Let’s create a PVC yaml using the above storage class…
We can create this resource and check for the following outputs:
show list of all pvc
Daemonset
describe a DaemonSet in a YAML file. For example, the daemonset.yaml file below describes a DaemonSet that runs the fluentd-elasticsearch Docker image:
create a Daemonset using following command:
Implementation of Configmap and secret application (with DB)
In configmap example, we will create a simple YAML that contains the data using vi editor
Configmap created using the kubectl apply command as shown below.
Use the following command with the appropriate ConfigMap name defined in the metadata section.
As secrets are defined by type, let’s create a basic-auth type Secret that contains the database username and password using vi editor
Secret can be created using the kubectl apply command as shown below.
As secrets contain confidential data, the describe command does not expose this secret data even when the user query through the kubectl using the specific secret name.
HelmChart
use the helmcreate command to create a helmchart
Let’s deploy an Apache webserver using Helm. As a first step, we need to tell Helm what location to search by adding a Helm repository:
Let’s install the actual container:
After a few minutes your deployment is ready. We can check the state of the containers using kubectl:
Helm can show us information about current deployments:
Helm stores deployment information in secrets – here they are:
Deply wordpress using helm chart
We can install using command as follows:
GitLab
Installation of GitLab in ubuntu using following command: