Document Tree
Document Properties
Kbid
3116F7
Last Modified
11-Apr-2024
Added to KB
11-Apr-2024
Public Access
Everyone
Status
Online
Doc Type
Guidelines
Product
  • Intershop Progressive Web App
  • Intershop Commerce Platform
Guide - AKS - How to Troubleshoot When Performing Deployment of a Docker Based App

Introduction

This document describes how to troubleshoot during or after deploying PWA on the Kubernetes cluster, so you can fix occurring issues immediately.

For more detailed information on the current CI/CD process on PWA and the most typical problems and questions, see Cookbook - Intershop Commerce Platform DevOps - CI Use Cases for Progressive Web App.

AKS Development Environment

Login to AKS on Local Environment

Add the AKS cluster to local kubectl config.

>>> az login
>>> az aks get-credentials --admin --subscription <SUBSCRIPTION_ID> -g <RESOURCE_GROUP_NAME> -n <CLUSTER_NAME>

Check available <cstmr> namespaces which host the customer project environment. Their names can be found in the table PWA CI/CD of the customer system page in your Confluence space.

Set default namespace for kubectl.

>>> kubectl get namespace
>>> kubectl config set-context --current --namespace=pwa-<cstmr>-<env>

Validate the selection.

>>> kubectl get pod

Monitoring Deployment

To check events for the namespace object during/after the deployment, use the below command. You should be able to see errors at an early stage during startup of a container or problems with memory/CPU resources, etc.:

>>> kubectl get events -w

To stop events, press CTRL+C.

To narrow event logs to a Pod object, use the following command and see the Events: section.

>>> kubectl describe pod <POD_NAME>

Check Deployment Status

  1. Run kubectl get deployments to check if the deployment has been created.
    If the deployment is still being created, the READY column displays how many replicas of the application are ready compared to the desired count.

  2. To see the deployment status, run kubectl rollout status deployment/<DPL_NAME>.
    If the deployment is successful, the output is similar to the following:

    deployment "<DPL_NAME>" successfully rolled out
  3. To see the Pod status, run kubectl get pods.
    The output should be similar to:

    NAME                                               READY   STATUS    RESTARTS   AGE
    <cstmr>-int-edit-pwa-main-84b6b79887-fs6d8         1/1     Running   0          15h
    <cstrm>-int-edit-pwa-main-cache-77667db86c-zzbhs   1/1     Running   0          14h
    <cstrm>-int-pwa-main-6dc65c7786-z769l              1/1     Running   0          15h
    <cstrm>-int-pwa-main-cache-6ddb497f4d-v24np        1/1     Running   0          14h

Examine Pod Logs

To see logs and check why a storefront is not working despite a successful deployment, enter the following: 

>>> kubectl logs <POD_NAME>

Debug with pod exec

>>> kubectl exec ${POD_NAME} -- ${CMD} ${ARG1} ${ARG2} ... ${ARGN}

To check logs on a running Pod, enter as follows:

>>> kubectl exec ${POD_NAME} -- /var/log/cassandra/system.log

It is also possible to enter the Pod and run the command in a shell terminal:

>>> kubectl exec -it <POD_NAME> -- /bin/bash

Resource Usage

To get an overview of current resource usage on Kubernetes Pod, for example, CPU/memory, go to Pod exec mode:

>>> kubectl exec -it <POD_NAME> -- /bin/bash
>>> cat /sys/fs/cgroup/cpu/cpuacct.usage
>>> cat /sys/fs/cgroup/memory/memory.usage_in_bytes

Compare the resources with the default for the respective environment in flux-caas-int or flux-caas-prd.

Check Desired Image Version Is Rolled Out

To check that the desired version is applied, run:

>>> kubectl get pod <POD_NAME> | grep <VERSION>

Helm Validation

  1. Check helm list to view releases of the specified namespace (names of Helm releases).

  2. Enter helm history <RELEASE_NAME> to view the Helm history.
    A change log appears with the status of deployment. Status deployed indicates a successful deployment.

  3. Get values of the current configuration of deployment: helm get values <RELEASE_NAME>.

Rollback to Previous Release Version

To roll back to the previous version after an unsuccessful deployment, run the following command omitting any argument.

To check customer <RELEASE_NAME>, run helm list. If the table output is empty, use the following pattern pwa-<cstmr>-<env>.

>>> helm rollback <RELEASE_NAME>

If you need to roll back to a specific previous version, check for latest revision numbers by running as follows:

>>> helm history <RELEASE_NAME>
>>> helm rollback <RELEASE_NAME> [REVISION]

Clear NGINX Cache

After completing the deployment, customers often request that the cache be cleared. To do so, follow these steps:

>>> kubectl get deploy
>>> kubectl rollout restart deployment <DEPLOYMENT_NAME>
Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.