Author: Dr. Bearmoo

Five Minute Tip: Kubernetes helm in multiple namespaces

Five Minute Tip: Kubernetes helm in multiple namespaces

A while ago I’ve upgraded the infrastructure to work in Kubernetes and having the application separated though namespaces. I’ve created deployment files and use helm to install applications in the cluster. I’ve found that using helm in multiple namespaces requires a bit extra editing to make it work.

Assuming helm client has been installed and ready to go. We’ll create a service account:

kubectl -n myapp create serviceaccount tiller

This basically creates a serviceaccount called tiller in a namespace called myapp. Now will need to create a cluster role binding for the account.

kubectl create clusterrolebinding tiller -n myapp --clusterrole=cluster-admin --serviceaccount=myapp:tiller

The –clusterrole=cluster-admin is defining what role is the account going to have. In this case, a cluster-admin role. The account can go beyond a namespace and view resources cluster-wide. The last part –serviceaccount=myapp:some-tiller-account tells Kubernetes where to install the service account. In this case, inside the namespace myapp.

Then install helm into that namespace:

helm init --service-account tiller --tiller-namespace myapp

Oh wait, what if we need helm to work in multiple namespaces? That easy! We can recycle the last command and installed a to install a service account into a different namespace:

kubectl create clusterrolebinding some-tiller-account -n mydata --clusterrole=cluster-admin --serviceaccount=mydata:tiller

Next, will need to update the clusterrolebinding so that helm can see what’s inside of another namespace.

kubectl edit clusterrolebinding tiller -n myapp

Origonal:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: tiller
  namespace: myapp

Updated:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: tiller
  namespace: myapp
- <span style="color: rgb(255, 0, 0);" data-mce-style="color: #ff0000;">kind: ServiceAccount</span>
<span style="color: rgb(255, 0, 0);" data-mce-style="color: #ff0000;">  name: tiller</span>
<span style="color: rgb(255, 0, 0);" data-mce-style="color: #ff0000;">  namespace: mydata</span>

That it! When you do a helm install or helm ls you should beable to see inside both namespaces.

Linux: Five Minute tip

Linux: Five Minute tip

I remember when I first started as Linux System Administrator, I would google Linux command lines. Expectedly if I was looking for a command but not sure what it might be called. It was not until I came across a command called apropos. It has saved my bacon and time when I was in a bind.

Looking at the command apropos:

In computingapropos is a command to search the man page files in Unix and Unix-like operating systems. apropos takes its name from the English word with the same spelling that means relevant. It is particularly useful when searching for commands without knowing their exact names. – source: wiki – apropos

basically, this command will search through the manpages in the description and manuals for the command that is being searched. Seeing the command I action:

apropos dmesg

dmesg (1) – print or control the kernel ring buffer
vmcore-dmesg (8) – This is just a placeholder until real man page has been written

 

That’s really cool how a simple the command it. You use the man command to read the manual of the command to go more in-depth with it.

My take on this; I’m glad that I’ve found this command and it has served my well up to the is.

The Vow my wife made to me!

The Vow my wife made to me!

Letter to Frank:

From The Catburgler…

Dr. Horrible, it’s been an interesting time getting to know you. In the beginning, you were shy and I couldn’t really read you. All I knew is that your very friendly. I couldn’t tell exactly what, but I knew there was something different about you. Over the course of the following months, I got to know you more and started to like you more. Like turned to love and love turned to deep and unconditional love and respect. I remember how unsure we both were then and how confident we are now. We have changed since we met and in the best ways. You lift me up when I’m down, you show me love and respect, your considerate and logical yet love having fun. Your adventurous. When we travel together, we share an insatiable appetite for culture, good food and history. Your quiet and yet enjoy dancing with me to good jazz. When we cook, it’s like we can read each other’s thoughts and create amazing dishes together. We truly bring out the best in each other. Our personalities may be different, our schedules may be really different but at the end of the day, we make time to spend with each other. We show appreciation and gratitude toward each other. We tackle any issue fiercely together. Being married to you will be an adventure; it will have ups and downs, but I know that at the end of the day, as long as we work together, we can handle anything and have fun with life along the way.

These are my promises to you as your wife:

  1. I promise to always love you.
  2. I promise to always dance with you.
  3. I promise to encourage laughter and adventure.
  4. I promise that whatever issue we face, we face together.
  5. I promise to always be the Catburgler to your Dr. Horrible (inside joke)
  6. just like you always are positive for me, I promise to lift you up when you are down and be a positive force for both of us.
  7. I will always be your adventure and cooking buddy.
  8. I promise Dr. Potato and Fig Newton will be encouraged to tolerate each other.
  9. I promise to regularly tell you how incredible you are.
  10. Most importantly, I Promise to always be your friend, your love and your partner in life

Frank, I love you so much and I’m in awe that we get to do life together.

====

Thoughts,

I really enjoyed the letter my wife wrote to me. When she read it to me, I can feel the emotions that she was trying to express to me along the expression of joy her face. The whole time, It made feel happy and proud to be her husband.

Eloping Adventure…

Eloping Adventure…

It’s been a while since I last posted here on the blog. But, since the last post, my now wife ,Stef, and I are now married! In December, Her and I talked about getting married and decided to set a date in SF city hall and invited a small group of people to our wedding.

In SF City Hall, we got married at the top of the stairs with a nice old lady who was the judge who officiates our wedding. We hire a photographer. He took pictures of Stef and I, and he all took pictures of with friends and family who came to the wedding. Stef and I have expressed to others that were not able to come, that we would like to do something personal; For example, have lunch or dinner in the near future.

I’m so happy to marry the woman I loved. She makes me happy when I’m sad. When there are times that She needs me, I will fight to be by her side and do anything in my power to help her. Whether it’s cooking, going on trips, or randomly doing stuff, it’s exciting, joyful, and that I’m always will to join her. I hope to do my best as her best friends, lover, and husband that I can be.

Thoughs – Getting Married

Thoughs – Getting Married

This month, Stef and I have had a serious discussion about marriage. I told her flat-out that I was thinking of doing a romantic proposal, but she did not want any of that. So we ask each other if we want to get married. (btw, she said yes!) The next day, we went down to a jewelry store to get our rings sized. Towards the end at the store, the jeweler suggests trying on different rings. Now, I’ve married in the past and I thought those feelings would be long gone. One of the rings I tried on that the jeweler presented, it had sparked a specific emotion and memory. It was a memory of when I used to look at the ring and reminded of the person you’re with and the cherished memories of that person. Along with the feelings of strength and commitment in my heart. Which has made even happier that we’re getting married though sooner than later. I will write about the Wedding day! My fiancée family has already welcomed me into the family, and her sister is happy that I will be her Bother-in-law. I’m glad, that I got to know her sister and her family well enough to know that I’m happy they’re going to be in my life as well.

Journal Entry – 10312018 – London Trip

Journal Entry – 10312018 – London Trip

Stef and I went to the United Kingdom for vacation and we stayed for most of the time in London. For me, I thoroughly enjoyed my stay in London and would consider going back again! I enjoyed using the public transportation system in the United Kingdom as it’s straightforward and reasonably priced. The weather was lovely at times, although it did rain here and there, it did not get too hot as I’m the type of person who does not like the heat so much. All so, enjoyed learning about the history of the United Kingdom and London.

The plane ride from SFO to LHR took about nine hours with Virgin Atlantic. I’ve been in a few economy class seats, but Virgin Atlantic was the most uncomfortable I’ve been in. There’s no real padding on the seat. much less, the seat makes me feel claustrophobic and uncomfortable(Virgin Atlantic, if you’re reading this, you need to invest in more comfortable seats! …. Just saying). The food on the plane is “Ok” at best, but it did fill me up. The flight offers WIFI service and considering that the plane has to use satellite service, the internet service is not too bad. Moreover, I notice that the airline WIFI partners are from other different carriers in the EU. All so, I saw EU versions of T-mobile like T-mobile Poland and T-mobile Germany? Is T-mobile global!?! Anyways, Under economy class seats, I notice that they have international power outlets, and I notice that it was pretty difficult for me to find it, much less see it due to the tight spacing. I had to feel around for the plugin with hands in order to find the correct position to plug in my laptop on. In addition, that outlet is pretty flimsy. The plug on my laptop kept falling out.

I stayed in the Hilton London Bankside hotel. The hotel was nice, comforting, and the staff were quite nice and helpful. The room offers complimentary soda and water. The bed smells clean and fresh. Which I like because I do not want to sleep on a dirty mattress and sheets. The tables and bathroom were clean as well. In the bathroom, their have the little bar of soap, little bottles of conditioner and shampoo. Besides the normal set of towels they have for the guess, They even offer bathrobes as well. The hotel offers a restaurant and bar that is next to the main lobby. I’ve only does breakfast at the restaurant where I got a “Full English breakfast” and super good. Oh, in the restaurant they offer tea and milk for free! All so, at the hotel, they offer complementary blue cheese to us one day, white wine on another, and a small cake for their guest. I have not tried the cake, but the blue cheese was all right.

Stef and I did a few tours together in and outside London. The Harry Potter tour we went on was super awesome! I got to see the behind the scenes of how Harry Potter the movie was made. Stef and I were amazed by how awesome the tour was. I got to see the great hall, the moving staircase, models of the town, and Hogwarts Castle. Oh, they even have the train that goes to Hogwarts and you’ll be able to go inside and see the passenger car that Harry, Hermione, and Ron would stay in for each movie. We did a food tour with a group of people in The Borough Market and it was well worth it. I got to try a lot of great food that London had to offer. I did like the blue cheese, although I discover on a food tour I like this blue cheese called “Stilton blue cheese” (soooo good!!) Stef and I went to Stonehenge and the city of Bath. It was pretty amazing! For Stonehenge as they offer an audio guide about the different spots, theories, and how people lived near Stonehenge. The city of Bath, we walked around and checked out the Roman bathhouse and Bath Abby. In the Roman bathhouse, it had a lot of signs and videos show what parts of the bathhouses were used for along the history of the bathhouse. Bath Abby is a church with gothic design and nice stain glass artwork.

During my stay in London Stef and I got to check out the Ice bar where there is a room mostly made of Ice. They serve you drinks in a large shot glass made of ice. The decor is made out of ice with neo lighting. Though we could not stay in the room too long as the bar only allows a person to be in there for 45 mins max. It seems that most of the shops and restaurants accept contactless payments which were super cool! The hotel gave us a bottom of white wine and I decided to take it home with me. Not sure what to do with it, besides save it if anything else, Christmas gift!?!?! Overall Stef and I enjoyed the trip together in London, and even though I touched on a few things briefly here, I will be more posts talking about more in detail about the different places that we visited.

Journal 08152018 – My site

Journal 08152018 – My site

Lately, I’ve gotten the notifications from my hosting provider and WordPress about my one anniversary of using their services. I never really talk about my site too much; nor I never really though too much about until now and realizing what it took for this site to become what is today. Initially it was a portfolio site so show case my work in Industrial Technology. It was until I got into writing and it changed the site a lot since then! From a small wiki site to a full-blown self hosted WordPress site, I’ll share my though of what were some of the challenges that I faced, what were the things I learned, and where do I see my site going forward.

When I first decided used WordPress I was not sure where it would take me much less what to do or write about. I decided that I would make it a place where I can journal and write about my life and my adventures. Where I would not only share the good, but the bad/challenges as well. My goal is be authentic as possible to those who come to my site and read my stories. I’ve learned that there is a fine line between privacy and what to share online. Like, having someone full name on my site, my house address, or talking about my adventure in New York. Those are the things I have to keep in mind when I’m writing and it’s challenging at times. Earlier this year, I’ve discovered the WordPress community, and it open my mind to read other bloggers stories and hearing there feed back and my post. It’s even helped me with some idea’s on what to write and feed back from the community which has encouraged me grow. Like when a blogger that goes by the named Rosie, explains to me how to resize the images, Or when another blogger helps me out by pointing out my spelling mistakes.

I first hosted my site at my apartment. It was great at first, but I faced many issues such as moving from place to place, power outages, power bills, and maintaining/replacing hardware. It was becoming too burdensome to manage. I find myself having to focus on trivial stuff instead of focusing on stuff that really matters. I looked at hosting providers and cloud services and after much research and though; I decided to move my site to Google Cloud! The process to upload the data and the website itself, took a long six months to a year and there were a lot of bump and hurdles that I had to learn. Like how google charges for storage, compute, or network bandwidth. Instead of using passwords to get into my servers, I needed to generate an keys to login with. When the move to Google Cloud had finished, I felt this huge weight off my shoulders. I can actually focus my goals that I want to achieved from my site.

Do see myself continuing to writing and making better content for people to enjoy. But all so, using my site to help develop my DevOps career path. To explore new tools in the background to keep the site up a running while trying get a 99.99% uptime, writing python code, and hopefully make a small income to help support the site better to help cover some of the cost of hosting the site.

Journal Entry – 07312018 – Back Pain

Journal Entry – 07312018 – Back Pain

Last month, I’ve had really bad back pain. I remember waking up and feeling this intense feeling radiating on my upper right back between the spine and right shoulder. After awhile it grew very intense. I’ve called the doctor and advised to try a few things like to take a hot shower, try exercising it, and take 200mg of Ibuprofen. Yea, towards the end it felt like it was getting worse! I realized that I need to goto emergency care but there was a small problem once I grabbed my car keys. I can not really drive with a messed up back! Luckily there’s an emergency services in the downtown area were I live and it takes me 20 minutes for me to walk it. I finally got there, and I got admitted pretty quickly. The doctor haved me do some strength tests and she poked my back where it hurts. After she got finished diagnosing me, she concluded that I might haved a pinched nerve, muscle inflame and that I might haved some muscle injury too where the pain is on my back. So she tells me to take it easy, try to stretch it out, and take 600mg of Ibuprofen. In addition, she gives a few sheets of paper with instructions on what exercises that I need to do to help relieved my back pain. For the next few days. I had to try to stay off on my back, take the train(or bus) to work and stand most of the time while in at work.

A week gone by since the beginning of my back pain, and I notice that not only that my right arm still feels weak, but it tinges from time to time I would feel pain throughout my arm as well. So, I schedule a doctor’s appointment and I got to see the doctor see her on the same day. She did the same tests that the urgent care doctor but additionally she tested me to see if I can feel a sharp or dull object. Based on the tests, Not only I still have muscle weakness in my arm, but there might be loss of feeling as well. At this point, I’m thinking great my right is going to fall off my body.

So she refers me to a see a Spinal expert and to get an MRI. I’m all so thankful that my girlfriend helped me out by getting me a Chiropractor. The Chiropractor really helped me a lot! He helped re-aligned my back using various compression and decompression techniques and using some sort of ultra sonic machine as well. I manage to get an MRI done and looking at the report, It looks like one of my disk on my back got slightly out-of-place that might be causing some pressure on my nerve and there is some pressure on my nerve as well. I’m going to see the Spinal expert again soon and I’ll give an update on what happen.

Journal – 05172018 – Dr. Potato and Camping

Journal – 05172018 – Dr. Potato and Camping

I’m proud my cat and how much she has grew. When Potato (my cat) first came to my house, she was shy, kept to her self, and try to hide everywhere. She would try to hide under  shoes, under the couch cushions, and various corners in my house. Over time, she grew in ways that makes her more confident in her surroundings. I wonder if it’s because I would challenger her or  she just trusts me. I remember when I first took her to the vet in her carry-on. She would make all sorts of racket and sounds when she was in her carry-on. Now she seems calm and relax. She seems to become more receptive towards people, before in the beginning she would run and hide under the bed or under the dinner room table. She still runs at first, but she eventually comes out to scope out what’s going on. When I left her at a kitty hotel, she was a sweetheart and I found out that she like to nap in the carnival room. When I pick here up, I got to seen how she reacts to the staff at her kitty hotel. She did not try bite, claw, nor scratch the staff when they try to pick her up.

Dr. Potato

I went camping for three days some time back with Stef. We went camping by the Russian River which was fantastic as you smell the clean air, fresh water, and at night you can see the stars shine bright in the night sky. The temperature at camp site by the Russian River did not get too hot, but it did got cold at night. It was perfect weather to hiking and exploring and forgetting about technology. Stef and I worked together as team in getting the tent setup, making food, and building a fire together to help keep us warm at night. In addition, we took the time to plan out our meals. For breakfast, we would make oat meal and tea/coffee. For lunch, we hand cold cuts sandwiches. With my Cast Iron Grill, for dinner we cooked, chicken with baked beans, bison burgers with corn, and turkey hotdogs. It so good! Stef and I got slow down a bit from our busy lives. Just sit around and write by the fire or just talking was very pleasant. I would like to do it again sometime in the near future and do more hiking.

Journal Entry – 05062018 – NY Trip!

Journal Entry – 05062018 – NY Trip!

I’ve never been to New York and I though it would be a good trip. To go see central park, Statue of liberty, and try a New York style hot dog. I asked Stef if she would be interested in coming along with me to New York, and she agree to come with me. The time that I plan for this trip was when I got laid off from my previous employer. So fast forward a bit to when I got hired at another company, My 90 day plan ends when I get back from my trip, But I felt that it was well deserved at the end of my 90 day as I did so much work in a short amount of time.

At the being of my trip, flying from SFO to JFK using JetBlue. My flight was five hours long. They offer free checked in luggage so I checked my luggage in. There was plenty of leg room and service was not too bad. They did offer free wifi! which was nice, which was nice as I was to browse though some of my goto sites, use wifi calling, and to some extent, stream Hulu shows like Silicon Valley. I really could not sleep on the plane though as sleeping upright is uncomfortable to me. I did get beer on the flight and a bottle of water, but when it came down to get food on the plane, they ran out of everything by the time they got to me. Although they were nice enough for them to not charge me for my beer and water.

The next day. Going though the Hudson river in a fairy, I arrive on Liberty Island were the Statue of Liberty is on. Seeing the statue in person is truly amazing and even standing in-front of it and realizing the size of it. There is a museum on the island that shows the history, and how was the statue made. It the museum showed the history of the statue, the iterations of the torch, its moldings, and repairs the status had it gone though.

Stef and I saw Avenue Q. I really enjoyed the show. The songs where catchy, it had good humor, and the play was very well put together. The theater, New World Stage, was really cool to go as it has many draws on its wall of famous people. For example, Leonard Nimoy, Alfred Hitchcock, and John Lennon just named a few. In addition, at the end of the play they were selling shirts that says:

Donald Trump is only for now!

Which I bought as tomorrow in head toward the Trump Towner. After the show, we went to Serendipity and tried their frozen hot chocolate. After try the desert, it was not my cup tea as it has this granny taste to it.

The next day, We went to the Ess-a Bagel. The bagels that place serves were really tasty. They were fresh and homemade. After eating a bagel, I did not get that heavy feeling inside of your stomach after eating a bagel that you would get from one that is store-bought. I got to try a Black and White Cookie for the restaurant as well. That moist spongy tasty cookie was awesome to have. After the bagel restaurant, we walk to 725 5th Ave. Where I had my T-shirt from the New World Stage theater and gone ahead to take a picture of myself while giving the bird to the current president. There were two people in-front of the Tower, One was the Pro and the other was against. I tried to have a logical argument with the Pro Trump Supporter, but he was ether dismissive in what I have to say, or defensive when I question is motives or ideals. The person who was against the current president was seem opened and having fun protesting. After that, we walked to the M&M World. In side, There I found so many flavors of M&Ms Like Mint, peanut brittle, regular, and Raspberry. For dinner, we went a restaurant called Raclette. Where the waiters serve you melted cheese on to your main course. It was really good! I got a steak with potatoes, and with hot cheese poured on top, it was just awesome!

The last day, I walked from the Brooklyn Bridge, to Central Park, and to the Wall Street bull, where they were impressive to see and though my journey I got see some great street performers putting on a show for people who were walking on by. It was nice to see people carry around their instruments around in the city as well, As it inspires me to continue to practice playing. And, who know, maybe one day I’ll come back to New York with my cello and play in the subway system or in Central Park while enjoying the moment. Using the New York subway system was pretty convent and cheap to get around the city. I normally have to wait between ten to fifteen minutes for a train to arrive a stop that I am at. The only issue that I have with the New York subway system, is that it get very confusing for someone who is not familiar with. The hotdogs that are sold on the street corner venders in New York are quite tasty to eat and filling.

%d bloggers like this: