New Course: Kubernetes Microservices

Second course to be published at Udemy: Kubernetes Microservices.

I’ve set up a coupon code for a great deal.

Unlike the previous Docker course, this one is independent of programming language (Angular 6 used on the front end)

– although of course I can’t help dropping in a few references to Java along the way.

It’s a 12 hour hands on project: scenario – developers have pushed a set of images for a microservice system. Your mission, should you choose to accept it: define a Kubenetes workload locally, then deploy it to the cloud. Build in a level of resilience and then set up a proper ElasticSearch basic logging and monitoring system.

At the end of the course you’ll use your monitoring system to discover the developers did a pretty bad job in one of their images!

It was fun to record, hope it will be fun to watch and more importantly, a great set of real world skills for you.

A version of the course will appear in around a week at virtualpairprogrammers too.

 

19 thoughts on “New Course: Kubernetes Microservices”

  1. Hi Richard,

    I am waiting for Design pattern using java courses in virtual pair programming.
    Please let me know are you planning to host that course any time soon.

    Thanks,
    Sandeep

    1. As always, it’s something we want to do but other things always seem to get in the way. Maybe it’s something best left for others to do better than us?

  2. Hello MR Chesterwood
    Thank You For the K8s course, it was a great help for me.
    are you panning on doing any thing for micro-services on udumy

    thank You

    1. I’d love to – my Microservices courses at VPP are old and dated already and I desperately want to get that sorted – but such a long queue of courses to do first! It will happen, but no dates…

      1. Hi Richard, you said the course at VPP Microservices are dated already. Isn’t it valid anymore? if still valid, then what are the possible updates needs to be added on that course? Didn’t see much info on errata.

        1. Hi, sorry for the delay I’m getting tons of spam and it takes ages to sort through it all!

          It is and it isn’t (dated), to give a confusing response. The course (the VPP microservices and microservice deployment) course was written in the very early days of our journey into microservices and whilst I think it’s all still valid, there are things in there that today I wouldn’t bother doing.

          [Edit for clarity – the “Kubernetes Microservices” course definitely isn’t dated, it’s my latest course as of Jan 2019 – the answer here is for my older “Microservice” course produced for VirtualPairProgrammers in I think 2016].

          Good example: Eureka, which takes a large proportion of the course, is an overly complex Service Discovery mechanism. Maybe Netflex and a few other huge estates might need it, but for most purposes the service discovery provided by eg Kubernetes is perfectly suitable.

          So there are things in there I would love to remove. Also, the “Microservice Deployment” course was just too complicated. You do a lot of hard work, managing separate EC2 instances for each microservice. I was TRYING to show pure microservices and get the concepts across without using containers, but of course you would never do this in practice.

          So do check it out still, nothing in there is bad but it doesn’t quite hang together.

          There’s still great stuff in there – Ansible, Jenkins, and some of the Netflix stack like Hystrix is still very valuable.

          My plan for this year is to produce a new version of it, where you take a monolith and progress it to a microservice architecture, but K8S and Docker will form the core of it.

  3. Hello Richard,

    I followed your class on Kubernetes MicroServices. It is really a good class.

    I am trying to deploy the fleetman application into an Azure AKS cluster. I adjusted the code somewhat to point to the Azure-Disk Storage class and also created a namespace specific for all the artifacts.

    But when I deploy the workloads.yaml, the webapp pod would not start. It barfs with a weird message:

    2019/04/15 17:24:15 [emerg] 1#1: host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23
    nginx: [emerg] host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23

    Do you know why this is so?

    Thanks,

    1. Hi Edward, sorry for the delay, I’ve not been giving enough love to the blog lately. Definitely always raise a question on the host site (vpp, udemy, etc) and you’ll get a quick reply.

      At first glance, it’s probably the namespace. In the code (the nginx I think) I hardcoded “fleetman-api-gateway.default.svc.cluster.local”. “default” is the namespace the service is in. Quickest fix is to put your api-gateway service back to the default namespace. Otherwise, you’ll need to fork the project and change the hardcode.

      Let me know if that works – again I might not be fast here, so do raise a Q&A at the publisher’s site!

      Rich.

      1. Hi Richard,
        I am going through your course and stuck at same point … getting host not found error message

        2020/07/27 18:01:50 [emerg] 1#1: host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23
        nginx: [emerg] host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23

        I also tried modifying your code in github.com k8s-fleetman/k8s-fleetman-webapp-angular/ but image creation is also got failed due to unavailablity of /dist folder (Dockerfile line number 14). You have added that folder in .gitignore so its not available in github repo.

        Can you please check and help me with resolution ? All pods are running in default namespace.

        Regards,
        Jidnesh

        1. Hi, this is usually caused by some problem with the api gateway service. Check that the pod is running for it, that you have defined a service with the exact name “fleetman-api-gateway” (vital), and that the selectors are definitely correctly for the service.

          There’s a few other more obscure things that can cause this (in which case, I’ll need your OS – are you on Linux? We’re away of a very obscure DNS bug on Linux) – report back.

          You’ll be best going to the Q&A forum on whichever platform you got the course from though, you’ll get much quicker replies on there as the blog has some odd spam software that can slow things down.

  4. Hi Richard,

    I had few questions regarding the architecture diagram you described in Kubernetes course, but I am not able to find your contact. Can you please mail me to my mail-id.

    1. Hi Suhas, just send a question to the Q&A board at Udemy, assuming that’s where you got the course from. I should be able to answer if I’m able, or the other students might also be able to contribute.

  5. Hello Richard,

    I’m going through your course on “Kubernetes Microservices” in https://learning.oreilly.com/ and have run into the same issue as some of the other users noted in this blog which is

    2021/04/06 03:28:28 [emerg] 1#1: host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23
    nginx: [emerg] host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23

    In oreilly, I don’t see a way to interact with the author like the way we can in Udemy. Are there any other options available for users like me who are on oreilly platform?.

    Thanks.

    1. Hi, no idea how support works at OReilly (it’s an odd setup there), but here is as good a place as any!

      This is because for some reason, the DNS lookup of the address “fleetman-api-gateway” is failing. There are several causes for this, I hope it’s a simple one!

      The simplest is do you have the service for fleetman-api-gateway defined correctly? It needs to be in the default namespace too (due to my silly hardcoding). You can confirm this with “kubectl get svc”.

      Can you paste up the output for “kubectl get all”, so we can check the pods etc are all correct.

      However, I suspect this might be something else – are you on a native linux platform like ubunutu? We’ve had loads of similar reports. If so, for some the DNS service there doesn’t work properly if using virtualbox. You can try:

      minikube delete
      minikube start –memory 4096 –driver=kvm

      If it’s none of the above, report back anyway (with the output copy/pasted) and I’ll take it from there.

  6. Hi
    I am watching your Udemy course but unfortunately I cannot pull the docker image. Any help?

    Thanks
    Valeriu

    1. Hi, best place is the Q&A board at udemy as it is quicker if we need lots of replies (the blog holds comments in moderation so it takes forever!)

      But I might be able to answer this in one: I’m guessing you’re missing the :tag, as I don’t use :latest on the images. I’ve just done “docker pull richardchesterwood/k8s-fleetman-webapp-angular:release2” and it’s pulled ok.

      Apart from that, it might be a temporary glitch at dockerhub, just try again.

      If none of the above, go to the Udemy Q&A board and post up your exact commands and error messages etc. Hope that helps!

  7. Looks like this can result if you do kubectl apply for workload and then don’t immediately start with services.yml too.

    I double checked my two YAML files and this error kept coming up until I applied services too.

    There was only two issues before that I had. Missing NodePort for fleetman-api-gateway in services.yml

    The other was not updating to webapp here under webapp deployment:
    spec:
    containers:
    – name: webapp <—

  8. Hi all,

    Regarding the “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23
    nginx: [emerg] host not found in upstream “fleetman-api-gateway.default.svc.cluster.local” in /etc/nginx/nginx.conf:23 in Linux locally in a minikube.

    The reason is the fleetman-api-gateway.default.svc.cluster.local will not work in a linux environment. It needs only the fleetman-api-gateway.

    So I inspected the code of the project and it is like:

    {% if SPRING_PROFILES_ACTIVE == ‘local-microservice’ %}
    proxy_pass http://fleetman-api-gateway:8080/;
    {% else %}
    proxy_pass http://fleetman-api-
    gateway.default.svc.cluster.local:8080/;
    {% endif %}
    In order to use only the fleetman-api-gateway pass the local-microservice environment variable in your workflows.yaml instead of the production-microservice.

    1. Hi, now this is interesting. That fully qualified domain name SHOULD work in a linux environment. Sorry you had to go to all that extra work though!
      Are you running on Ubuntu out of interest? We’ve had a lot of strange problems with DNS on Ubuntu which seem to be solved if you use the KVM driver on minikube – can you let me know if this matches your environment, it might be useful evidence!

Leave a Reply

Your email address will not be published. Required fields are marked *