How to diagnose Kubernetes Pod Launching problems? - asp.net

I followed these instructions to create a Hello-World WebApp with C#/.NET Core 3.1 with Visual Studio 2019 V16.5.2 and deployed to Azure Kubernetes Services (AKS) and it worked great. In addition to being able to debug/single-step with Visual Studio, I could also use the kubectl run command and edit the deployment to make it a LoadBalancer and see my hello-world web page in the browser.
Then I published the same image of the WebApp to my personal DockerHub account and tried to deploy to Docker for desktop/Kubernetes. When doing kubectl get pods -o wide I saw the status of the pod is ImagePullBackOff and kubectl logs <podname> fails to give me a log where might have some hints as to the problems.
(1) How does one diagnose a problem like this with no log files?
(2) Could this be a bug since this image works on AKS? I'd prefer to use Docker Desktop.
Thanks

I am using this:
kubectl describe pod {pd-id}
it shows whole bunch of the information including errors related to pulling image.
also most probably your ImagePullBackOff is related to authentication problem of kubernetes against image registry.

Related

Deploying a .NET Core + Angular SPA with Docker and GitLab

I have a droplet in Digital Ocean with Ubuntu 20.04 and a .NET Core web application that connects to Mongo.
My deployment workflow is the following:
I work locally with Visual Studio and release my app to a folder.
Then I connect to my server through FTP and drag the content of my folder to /var/www/myapp
Secrets are managed by Azure (it took me a lot of time to set this up).
A service runs the app and restarts it if needed.
The web server is Nginx
Everything works fine, nothing new so far. However, I'd like to automate each deployment and I found GitLab can run a pipeline to help me achieve that. The problem is I don't understand how to set this up correctly since I've seen there are more partes involved, such as Docker and Kubernetes, and I feel a bit overwhelmed.
Do I need to "dockerize" my application, database, etc.? If I want to add Angular as the client side, do I need to dockerize it as well or it goes in the same container as the .NET Core app?
Do I need Kubernetes? If so, why?
What would be the most straightforward and recommended way of achieving a CI/CD for my app?
It took me a lot of effort to deploy to my Linux server and I'm afraid I can destroy something in production.
I would really appreciate any help.

SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080

I am windows developer trying to use Camunda model rest API client project.
I did download the sample from the GIT which has examples for Camunda samples using WPF.
https://github.com/mtringuyen/camunda-dot-net-showcase
However there seems to be some sort of socket exception.
IIS is installed. I also verified versioning of .NET STANDARD and .NET FRAMEWORK. They are compatible.
Any suggestions to resolve this error?
Thanks in advance
The project you are using only contains
a .NET tasklist implementation used by people to participate in the business processes.
.NET implementation of automated task workers, which are used to do system integration from .NET (See: https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/)
The Camunda server remains a Java application. However, you can start it and use it as a blackbox from .NET without Java knowledge. There are several distributions. If you are not familiar with Java you should either use the Docker image:
docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest
or a prepackages Tomcat using the Camunda RUN distribution.
You can download a server here: https://camunda.com/download/
Also see: https://docs.camunda.org/manual/latest/installation/
If you think an application that is running is listening on a particular port a quick way to check would be to run a command prompt as administrator and do a netstat -ab . This will show you all the ports that are listening on your local device. Obviously your example requires something listening on 8080 so fire up whatever application that is supposed to be and double check it.

how to migrate an existing website hosted on wordpress to kubernetes on GKE?

I want to migrate an existing website hosted on wordpress to kubernetes using GKE or even gce but i do not know where to start. I haven't written any code yet. I tried to find solutions online but I didn't find anything on migrating a website HOSTED on wordpress to kubernetes.
How can i fetch the database
What should the dockerfile look like
How many yaml files should be included
How many pods do i create
You can create and run with on one pod also but it's depends on your wensite traffic.
You can start with the two pod initially one for Mysql and another for wordpress application it self.
You can create two yaml for the same and one docker and apply it to kubernetes cluster.
Follow this simple guide and start your wordpress on kubernetes :
https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

How to setup docker-compose to work with app engine and wordpress?

I am using gitlab ci/cd to deploy my app to google app engine. I already have php instance working properly but when i try build wordpress image using docker-compose, nothing happen.
these are my files:
I have a folder "web" with a files ping.php: https://site-dot-standalone-applications.appspot.com/ping.php
So application is running into /web folder.
wordpress should be deployed into /web folder after:
docker-compose up
UPDATE
Just needed use the following gitlab-ci.yaml:
Unfortunately, you cannot (easily) deploy containers to App Engine Flex this way.
At its simplest, App Engine Flex is a service that combines a load-balancer, an auto-scaler and your docker image. Your image when run as a container is expected to provide an HTTP/S endpoint on port 8080.
There are 2 ways that App Engine could support your deployment but it does neither:
It bundles a WordPress app image and a MySQL image into a single "pod" and exposes WordPress' HTTP port on :8080. This isn't what you want because then each WordPress instance has its own MySQL instance.
It separates the WordPress app into one service and the MySQL app into another service. This is closer to what you want as you could then scale the WordPress instances independently of the MySQL instances. However, databases are the definitive stateful app and you don't want to run these as App Engine services.
The second case suggests some alternative approaches for you to consider:
Deploy your WordPress app to App Engine but use Google Cloud SQL service link.
If you don't want to use Cloud SQL, you could run your MySQL database on Compute Engine link.
You may wish to consider Kubernetes Engine. This would permit both the approaches outlined above and there are tools that help you migrate from docker-compose files to Kubernetes configurations link.
Since you're familiar with App Engine, I recommend you consider using option #1 above (Cloud SQL)

MUP Deployed Site Not Displaying After Update

I used Meteor Up (MUP) to deploy my meteor app to a Digital Ocean droplet. I had some problems with deploying it the first time but I solved all of them and I got it working. I then made some updates to my app but when I deployed it again the page says "This webpage is not available". I have tried re-deploying the app on new droplets with different IP addresses but the same happens. I have run mup setup on each new droplet. It always says success for the setup and for the deployment but nothing shows up.
Can anybody tell me what I have done wrong?
It's likely there is some kind of error with your app, probably not related to deployment if it the issue occurs in the way your describe it.
You'll have to check your app's server side logs for a bit more info:
mup logs -f

Resources