My First App Deployed

After the Habor/docker troubleshooting, I finally figured out how to make a python web app push to my k8s ingress.

The first part, I created a hello world flask app, built a docker image, tagged the image, then pushed the image to harbor registry.

Once the image is in harbor, I created a deployment and a service to default namespace.

Since this deployment will be my web layer, I want to expose it through ingress with TLS. In my home lab, I setup a DNS name ‘ingress.home.lab’ with IP ‘10.0.0.31’. I used cert-manager to issue a server certificate as secret for this DNS name. The following is how I setup nginx-ingress with cert-manager.

Then go to the browser and connect to my ingress:

I feel great that I have a very basic pipe line working. Many of those steps can be automated. From developer’s point of view, I should focus on writing new feature and using git to push my codes to Github or Gitlab. Let CI/CD pick up my code merge and build/tag/push the new image. From there, I can start exploring service mesh with different deployment patterns. Stay tuned.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store