Cloudplex

Cloudplex

  • Product
  • Features
  • About
  • GET STARTED FREE

›Docusaurus

Docusaurus

  • AKS Provider Managed KubePlex
  • AWS User Managed KubePlex
  • Pods And Containers Lab
  • Container Service with Persistent Volume
  • Container Service with Secret
  • AKS Provider Managed Infrastructure
  • AWS User Managed Infrastructure

Container Service with Secret

Objective

In this lab, you will learn how to deploy a MySQL server using Cloudplex integrated Docker-Hub which will be used to pull pre-build MySQL image and use Cloudplex secret service to store Kubernetes Secret.

Prerequisite

If you want to deploy this lab, you need to deploy at least one infrastructure. We have labs on infrastructure as well, you can follow them to deploy infrastructure

Add Application Info

Give name to your application and specify the version, you can add tags to your application as well

app-info

Click on the next button on the top right corner.

Add Secret Service

CloudPlex platform provides a secret management service that provides the ability to store sensitive data such as passwords, tokens, and certificates in Cloudplex. Any data entered in this service is stored in a secure vault with at-rest encryption. This eventually becomes a Kubernetes Secret in a deployed application.

To configure the service, Drag-n-drop Secret service from pallet to the canvas.

secret-service

Click on the service to open the configuration panel on the right side.

The platform will populate the default values of service (Service Id, Service Name, Namespace)

secret-service-info

Click on Add secret string and type MYSQL_ROOT_PASSWORD in key and the Password in the value field. For this lab, type (the password as shown) 5dzo2MsriVJNYTTtud8gOyDc3A in the value field.

secret-key-password

key : MYSQL_ROOT_PASSWORD
value : 5dzo2MsriVJNYTTtud8gOyDc3A

Click on save button to save service

button-save

Configure the MySQL Container

Drag-n-drop the Docker Hub service from pallet to the canvas.

docker-hub-service

Drag the arrow from Secret service to Container service.

dockerhub-secret-link

Click on the service to open the configuration panel on the right side.

docker-hub-service-configuration

Type MySQL in the search bar and click on the search button.

mysql-search

Select MySQL service.

mysql-service

CloudPlex automatically pulls all the tags and metadata of the image and populates default values of service (Service Id, Service Name, Namespace, Type)

Add new Environment Variables

Click on the Environment variables section to add a new environment variable.

Cloudplex provides two types of variables (Static, Dynamic). We are going to use Dynamic variable in this lab to use the Secret key in our container

dynamic-parameters

Select the secret service from the service drop-down and type MYSQL_ROOT_PASSWORD in the key field.

dynamic-variables-key

Expand Service Attributes and Secrets Data and select MYSQL_ROOT_PASSWORD. Cloudplex automatically generates dynamic parameters for you.

dynamic-variables-key-select

Click on the save button to save the parameters.

save-button-2

A new environment variable with the key MYSQL_ROOT_PASSWORD will be added in the list of Environment Variables.

saved-environment-variable

Click on the back button on top of the configurations.

Add new Port

Ports are required to access your applications. Click on the Port section to add a new port

Add-Ports-01

Cloudplex automatically discovers ports from Docker images and populates them in the ports section of the service.

Add-Ports-02

Click on the save button to save the service.

service-save

Deploy Application

Click on the Deploy button at the top right corner and select the Infrastruture from the drop down list of your deployed infrastructures, your deployment will start right after saving the application and it will redirect you to the logs tabs or you can save it by clicking on the Save button to deploy it later.

In the log window, you can see the logs of your application.

app-deployment-logs

!! Deployment will take around 2 minutes!!

You can see the status of the application you just deployed by clicking on the Status tab and click on Table view to see the realtime status of the services.

app-status

Cleanup

To avoid unnecessary costs, don’t forget to terminate your application when you are done. Click on the Terminate button to terminate your application and dont forget to Terminate the infrastrusture(s) that you used to deploy this lab.

Conclusion

Congratulations! you just completed this lab and learned how to run a My-SQL server with Secrets on Kubernetes using Cloudplex platform.

← Container Service with Persistent VolumeAKS Provider Managed Infrastructure →

PRODUCT

  • Product
  • Features

RESOURCES

  • Blogs & Tutorials
  • Free eBooks
  • Video
  • Documentation
  • Hands-on Labs

COMPANY

  • About
  • Terms of Service
  • Privacy Policy
  • Terms of Website Use

GET YOUR KUBERNETES APPLICATIONS UP AND RUNNING IN MINUTES

GET STARTED FREE
footer-logo