diff --git a/docs/_posts/2024-12-09-troubleshooting-an-aks-sitecore-solution.md b/docs/_posts/2024-12-20-troubleshooting-an-aks-sitecore-solution.md
similarity index 62%
rename from docs/_posts/2024-12-09-troubleshooting-an-aks-sitecore-solution.md
rename to docs/_posts/2024-12-20-troubleshooting-an-aks-sitecore-solution.md
index c0e53c5..2aafe4b 100644
--- a/docs/_posts/2024-12-09-troubleshooting-an-aks-sitecore-solution.md
+++ b/docs/_posts/2024-12-20-troubleshooting-an-aks-sitecore-solution.md
@@ -1,6 +1,6 @@
---
title: "Troubleshooting an AKS Sitecore solution"
-date: 2024-11-29 12:00:00 +0100
+date: 2024-12-16 12:00:00 +0100
categories:
- Sitecore
tags:
@@ -12,7 +12,7 @@ tags:
author: ryilmaz
---
-![Kubernetes](../files/2024/12/09/kubernetes.jpg "Kubernetes")
+![Kubernetes](../files/2024/12/20/kubernetes.jpg "Kubernetes")
# Introduction
With a Kubernetes solution such as AKS, it is easier to scale the application according to your needs and simpler to deploy. However, troubleshooting is more difficult and requires different tools than with an app service solution.
@@ -28,11 +28,11 @@ https://github.com/MuhammedKalkan/OpenLens/releases
### Pod Menu Extension
With version 6.3.0, the Node / Pod Menu with the useful functionalities attach, shell and logs were removed from OpenLens.
-![MissingPodMenu](../files/2024/12/09/missing-pod-menu.png "Missing pod menu")
+![MissingPodMenu](../files/2024/12/20/missing-pod-menu.png "Missing pod menu")
To bring it back, you can add the POD Menu Extension from [this repository](https://github.com/alebcay/openlens-node-pod-menu).
-![PodMenu](../files/2024/12/09/pod-menu.png "Pod menu")
+![PodMenu](../files/2024/12/20/pod-menu.png "Pod menu")
## Alternatives
Currently OpenLens is the tool I use, but since the project is no longer being maintained, there are alternative open source tools that I may use in the future. They are very similar, free, open source and actively in development, here are some examples:
@@ -44,7 +44,7 @@ Currently OpenLens is the tool I use, but since the project is no longer being m
## Connection to Azure
To connect an AKS Cluster from your local machine, first close your OpenLens instance, go to the [Azure Portal](https://portal.azure.com), find your **AKS Cluster (1)**, go to **Overview (2)** and press **Connect (3)**.
-![ConnectionToAzure](../files/2024/12/09/connection-to-azure.png "Connection to Azure")
+![ConnectionToAzure](../files/2024/12/20/connection-to-azure.png "Connection to Azure")
On the right side of the browser, a menu will open. Select Azure CLI and follow the instruction.
@@ -53,46 +53,70 @@ Adding the cluster via Azure CLI will edit your Kubernetes config file on your m
You may need to add the Kubernetes folder to OpenLens via menu, File, Preferences:
-![FilePreferences](../files/2024/12/09/file-preferences.png "File - Preferences")
+![FilePreferences](../files/2024/12/20/file-preferences.png "File - Preferences")
Go to Kubernetes (1), press Sync folder (2) and add the folder where the Kubeconfig file is stored C:\Users\USERNAME\.kube
-![SyncFolder](../files/2024/12/09/sync-folder.png "Sync folder")
+![SyncFolder](../files/2024/12/20/sync-folder.png "Sync folder")
## Clusters in OpenLens
After adding the clusters, in the Catalog (1) select Clusters (2) and you will see all the added clusters (3) in the overview.
-![ClustersOverview](../files/2024/12/09/clusters-overview.png "Clusters overview")
+![ClustersOverview](../files/2024/12/20/clusters-overview.png "Clusters overview")
## Namespace filter
When you open the Pods menu (1), and see only one pod (2), it's possible that the selected namespace (3) is not the one you want. You can op the namespace dropdown menu (4) and select the one you want.
-![NamespaceFilter](../files/2024/12/09/namespace-filter.png "Namespace filter")
+![NamespaceFilter](../files/2024/12/20/namespace-filter.png "Namespace filter")
## Basic operations
### View and download logs
To view the live logs of a Pod, go to Workloads (1), then Pods (2), select the Pod (3), press Pod logs (4) from the pod menu extension, select the container (5) and the logs will shown in the terminal below (6).
-![ShowLogs](../files/2024/12/09/show-logs.png "Show logs")
+![ShowLogs](../files/2024/12/20/show-logs.png "Show logs")
To download all logs, click on the Download button (1) and choose between All logs (2).
-![DownloadAllLogs](../files/2024/12/09/download-all-logs.png "Download all logs")
+![DownloadAllLogs](../files/2024/12/20/download-all-logs.png "Download all logs")
### Pod Shell
+You can use the pod shell to use shell commands for example on the CM. Go to Workloads (1), then Pods (2), select the Pod (3) and press Pod Shell (4). The Pod Shell will open on the bottom (5) where you can navigate to a folder, list, read, or update files.
+![PodShell](../files/2024/12/20/pod-shell.png "Pod shell")
### Restart a deployment
+
Go to Workloads (1) - Deployments (2) select the deployment (3) you want to restart, press the restart button (4) and confirm.
-![RestartDeployment](../files/2024/12/09/restart-deployment.png "Restart a deployment")
+![RestartDeployment](../files/2024/12/20/restart-deployment.png "Restart a deployment")
+
+### The Terminal
+There is a Terminal (1) in OpenLens, with that you can use directly kubectl commands without any additional installation.
+
+![Terminal](../files/2024/12/20/terminal.png "Terminal")
+
+#### Copy files from a container to your computer
+With the terminal, you can copy for example a dll to your local machine by using following command:
+
+{% highlight console %}
+kubectl cp -n sitecore sitecore-cd-abcd123456-foo12:\inetpub\wwwroot\bin\website.dll .\localwebsite.dll
+{% endhighlight %}
+
+The command is composed as follows:
+{% highlight console %}
+kubectl cp -n NAMESPACE sitecore-cd-YOUR-POD:PATH_TO_REMOTE.DLL .\LOCAL_PATH.DLL
+{% endhighlight %}
-### Copy files from a container to your computer
+#### Copy files from your computer to a container
+Copying a local file to the remote container is based on the same principle:
+{% highlight console %}
+kubectl cp .\localwebsite.dll -n sitecore sitecore-cd-abcd123456-foo12:\inetpub\wwwroot\bin\.website.dll
+{% endhighlight %}
-### Copy files from your computer to a container
+# Conclusion
Photo by Growtika on Unsplash
diff --git a/docs/files/2024/12/09/clusters-overview.png b/docs/files/2024/12/20/clusters-overview.png
similarity index 100%
rename from docs/files/2024/12/09/clusters-overview.png
rename to docs/files/2024/12/20/clusters-overview.png
diff --git a/docs/files/2024/12/09/connection-to-azure.png b/docs/files/2024/12/20/connection-to-azure.png
similarity index 100%
rename from docs/files/2024/12/09/connection-to-azure.png
rename to docs/files/2024/12/20/connection-to-azure.png
diff --git a/docs/files/2024/12/09/download-all-logs.png b/docs/files/2024/12/20/download-all-logs.png
similarity index 100%
rename from docs/files/2024/12/09/download-all-logs.png
rename to docs/files/2024/12/20/download-all-logs.png
diff --git a/docs/files/2024/12/09/file-preferences.png b/docs/files/2024/12/20/file-preferences.png
similarity index 100%
rename from docs/files/2024/12/09/file-preferences.png
rename to docs/files/2024/12/20/file-preferences.png
diff --git a/docs/files/2024/12/09/kubernetes.jpg b/docs/files/2024/12/20/kubernetes.jpg
similarity index 100%
rename from docs/files/2024/12/09/kubernetes.jpg
rename to docs/files/2024/12/20/kubernetes.jpg
diff --git a/docs/files/2024/12/09/missing-pod-menu.png b/docs/files/2024/12/20/missing-pod-menu.png
similarity index 100%
rename from docs/files/2024/12/09/missing-pod-menu.png
rename to docs/files/2024/12/20/missing-pod-menu.png
diff --git a/docs/files/2024/12/09/namespace-filter.png b/docs/files/2024/12/20/namespace-filter.png
similarity index 100%
rename from docs/files/2024/12/09/namespace-filter.png
rename to docs/files/2024/12/20/namespace-filter.png
diff --git a/docs/files/2024/12/09/pod-menu.png b/docs/files/2024/12/20/pod-menu.png
similarity index 100%
rename from docs/files/2024/12/09/pod-menu.png
rename to docs/files/2024/12/20/pod-menu.png
diff --git a/docs/files/2024/12/20/pod-shell.png b/docs/files/2024/12/20/pod-shell.png
new file mode 100644
index 0000000..e84d9ed
Binary files /dev/null and b/docs/files/2024/12/20/pod-shell.png differ
diff --git a/docs/files/2024/12/09/restart-deployment.png b/docs/files/2024/12/20/restart-deployment.png
similarity index 100%
rename from docs/files/2024/12/09/restart-deployment.png
rename to docs/files/2024/12/20/restart-deployment.png
diff --git a/docs/files/2024/12/09/show-logs.png b/docs/files/2024/12/20/show-logs.png
similarity index 100%
rename from docs/files/2024/12/09/show-logs.png
rename to docs/files/2024/12/20/show-logs.png
diff --git a/docs/files/2024/12/09/sync-folder.png b/docs/files/2024/12/20/sync-folder.png
similarity index 100%
rename from docs/files/2024/12/09/sync-folder.png
rename to docs/files/2024/12/20/sync-folder.png
diff --git a/docs/files/2024/12/20/terminal.png b/docs/files/2024/12/20/terminal.png
new file mode 100644
index 0000000..2573f73
Binary files /dev/null and b/docs/files/2024/12/20/terminal.png differ