Having fun with Helm and file encoding

Had some spare time, so I’ve tried to learn a bit more about Helm, the package manager for Kubernetes.

I’ve decided to follow the relatively new Pluralsight course called – Kubernetes Package Administration with Helm, done by my MVP colleague Andrew Pruski. And it was great – not too long, clear and easy to follow, with only a handful of prerequisites if you want to follow along! Great job!

Of course, there is also the nice, official documentation.

But why am I writing this post?

I was normally following this course on my Windows 10 laptop, using Visual Studio Code, as suggested, and also using PowerShell terminal, with Helm v3.3.1.

It all went well until the part when we are creating our Helm Chart, more specifically – when we’re filling up our deployment.yaml and service.yaml files. Suggested (and simplest) method is to use the simple output redirection (with “>“), like this:

But, this gave me the following error when trying to deploy the chart:

It’s quite obvious – Helm works with UTF-8, and my .yaml files seem to be encoded differently. Quick look at the bottom of my VSCode confirms it:

How can I fix it?

As I’m using PowerShell, it’s pretty easy – instead of doing the simple output redirection (“>“), I pipe output to Out-File cmdlet with -Encoding UTF8 option, in all cases, which takes care of the encoding (and sets it to UTF-8 with BOM, which is just fine for Helm):

So, long story short – if you run into the error above (Error: unable to build kubernetes objects from release manifest: error parsing : error converting YAML to JSON: yaml: invalid leading UTF-8 octet”), remember to check your file’s encoding (and change it to UTF-8, if needed)! 🙂

Cheers!

P.S. Thanks to good people at Pluralsight for providing me a complimentary subscription!

Something new – Google Cloud Certified: Associate Cloud Engineer (ACE)

So, I’ve decided to end last year in style – as my Christmas gift to me, I’ve purchased Linux Academy (monthly full-access plan) and taken their course to prepare for the Google Cloud Certified: Associate Cloud Engineer (ACE).

And yesterday, I’ve taken and passed the certification exam (OK, still waiting on the official e-mail from Google; it takes 7-10 days, as it said on the exam). 🙂

UPDATE: It’s here!

This brought me another nice badge (as this is “a thing” now):

Why?

Well, I’ve been curious.

I know – “curiosity killed the cat”… except, this time, it didn’t! 🙂

Let’s get serious – I wanted to better understand how and why would someone use Google Cloud (GCP) instead of (or even in conjunction with), I don’t know, Microsoft Azure or AWS or even Exoscale.

The only fair way to do this would be to learn about the platforms, spend some time using them and decide about their strengths and weaknesses (for your specific scenarios)… while keeping in mind that things move and change pretty fast now (something you’ll be missing today in, for example, Microsoft Azure, will perhaps be there in a matter of months, so… nothing is really final)! And this is exactly what I did/do/will keep doing – trying to stay on top of things.

How?

I’ve already mentioned that I’ve taken the course, but here is a short list of what I’ve used, with links:

  • Linux Academy course (they say it adds about +30% on top of your GCP knowledge – sessions are nice, updated regularly, practice tests and hands-on labs certainly help a lot(!)… and you can take a monthly subscription)
  • hands-on experience in using GCP (open up a free account, add custom domain, set up identity provider, bring up some Kubernetes clusters, store some files, …, just play around a bit and try the things out by yourself!)
  • exam guide (it’s nice to read what they’ll test you on)
  • official documentation (yes, you’ll need to read something as well… sorry)
  • practice exam (it’s there, it’s free, try it out… more than once!)

What’s next?

Considering Google Cloud – I’ll probably take a peek at Professional Cloud Architect certification as well.

Considering other learning/certifications – as I’ve done all of the Microsoft Azure exams (that were available at the time), maybe I’ll continue with deepening my knowledge about AWS, who knows… it all depends on my next adventures.

Considering everything else – we’ll see where I’ll end up in 2020 (I’m pretty sure I won’t be doing what/where I was doing in 2019, but we’ll see ;))!

Happy 2020!