Reference Navigation Down arrow

Creating a Deployment


Distelli works directly with Kubernetes deployment specifications in YAML format.

Below is an example:

apiVersion: extensions/v1beta1 kind: Deployment metadata: name: k8s-mysql spec: revisionHistoryLimit: 3 minReadySeconds: 10 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 10% maxSurge: 10% replicas: 1 template: metadata: labels: app: mysql spec: containers: - name: k8s-mysql image: doct15/k8s-mysql:134666 ports: - containerPort: 3306 hostPort: 3306 protocol: TCP name: mysql volumeMounts: - mountPath: /etc/mysql name: mysql-etc - mountPath: /var/lib/mysql name: mysql-varlib volumes: - name: mysql-etc emptyDir: {} - name: mysql-varlib emptyDir: {}

Before a Kubernetes deployment spec can be created, in Distelli, the cluster and namespace where the deployment is to occur must already exist in Distelli.

Create Deployment

  1. Navigate to an existing project in Distelli. It is not important which one.
  2. In the top right, click the Rocket deploy icon.
  3. Deploy Icon
  4. Select the Cluster you wish to create a deployment spec for.
  5. Deploy to Cluster
  6. Click Create a new deployment.
  7. Paste in your Kubernetes deployment specification YAML.
  8. Deployment spec
  9. Give the deployment a Deployment Description (required).
  10. Click Deploy to finish.

This will create the deployment specification and initiate an initial deploy to the cluster as defined in the specification.

This deployment specification is now available to add to a project pipeline.

Deploy Success

A deployment specification that does not have a minReadySeconds field specified (The field that tells Kubernetes how many seconds a new pod should be up for without crashing before being marked as available), will be judged as a success if the up-to-date number of pods reaches the desired number of pods.

A deployment specification that has the minReadySeconds field specified will be deemed a success once the up-to-date and available number of pods reaches the desired number of pods.

Next Steps

Set Auto-Deploy in a Pipeline