Manage your Kubernetes cluster in Codefresh

Explore your services on Kubernetes Cluster

After adding a cluster, you’ll be able to manage your Kubernetes assets via the Kubernetes tab on the left pane. Clicking on Kubernetes icon will take you to your services dashboard.

Access your clusters

Watch the services currently running on your clusters. You can use the filter in order to refine your view according to preferred clusters / namespaces.

You will be able to see the following parameters for each service:

  • Name
  • IP
  • Cluster
  • Namespace
  • Selector

Work with your services

In this view, you will be able to perform the following actions

  • Add new service
  • Edit/Update existing services
  • Remove service

Codefresh Kubernetes Dashboard

Codefresh Kubernetes Dashboard

Deploy new service

Add service

To add a service, click the “Add Service” button. Insert basic definitions for your new Service

Select your image

You can add images built in Codefresh which were pushed to Codefresh registry or provide a name for Docker image that will be pulled from external Docker registry.

Screen Shot 2017-07-23 at 6.46.17 PM.png

Use the following steps in order to add Image and pull secrets from Codefresh Registry:

  • Specify the image name in the format<ACCOUNT>/<IMAGE>:<TAG>
  • Provide image pull secret - this shall be done for each namespace

Screen Shot 2017-09-06 at 6.28.30 PM.png

Set Environment variables

Screen Shot 2017-07-23 at 6.42.58 PM.png

Set required resources for your service (optional) - CPU, Memory

Screen Shot 2017-07-31 at 10.12.53 PM.png

To add service using K8 yaml file:

Toggle the Deployment option button to the “Advanced” position (different naming in composition, not consistent) Copy and paste your existing K8 yaml files:

  • Service
  • Deployment

Pasted image at 2017_07_23 03_17 PM.png

Pasted image at 2017_07_23 03_18 PM.png

Congratulations! Your service is now deployed to your K8 cluster!

You can update it from your Kubernetes services window - Just hit the “edit” icon and update your service using the same steps as in “Add new service” section.

Automate your deployment

After your service is deployed to your Kubernetes cluster, you can automate image deployment using Codefresh pipelines.

Just add the following to your pipeline definition:

  1. In build step - define Docker registry to push

Screen Shot 2017-08-01 at 12.09.31 PM.png

  1. Select Kubernetes (Beta) option in the deployment step drop down, and define desired cluster, namespace, service and branches for deployment.

Screen Shot 2017-07-31 at 10.10.46 PM.png

Screen Shot 2017-07-31 at 10.19.23 PM.png

Adding step to Codefresh yaml

See detailed explanation here


Click here to see an example of deploying our Demochat app to Kubernetes cluster.