Article

    How to restart deployments

    1 min read
    Last updated 3 months ago

    [Server 4.x] How to restart deployments – CircleCI Support Center

    Overview

    In CircleCI Server, the services are managed as Kubernetes deployments.
    This article shows you how you can re-deploy these services via Kubernetes.

    Check deployments

    We can list all deployments and their statuses via:

    kubectl -n <namespace> get deployment
    

    Restart a specific deployment

    You can restart a specific deployment like this:

    kubectl -n <namespace> rollout restart deployment frontend
    deployment.apps/frontend restarted
    

    Restart deployments using layer labels

    Multiple deployments (or statefulsets) can also be restarted using labels, eg)

    kubectl -n <namespace> rollout restart deployment -l layer=application
    

    CircleCI Server deployments and statefulset are currently labelled with layer application for front-end pods, database (for back-end such as Postgres or MongoDB or execution (nomad

    Outcome

    You can verify by inspecting the age of the pods:

    % kubectl get pods -n circleci -l app=frontend
    NAME                        READY   STATUS    RESTARTS   AGE
    frontend-5b8c9764d5-pz9pl   1/1     Running   0          2m26s
    

    Additional Resources: