Category Archives: new!

Quote

A trick to resolve issues with YAML files for Kubernetes

I was going through this exercise for Using Calico network policies to block traffic when I thought that instead of deploying the webserver image using this command:

kubectl run webserver --image=k8s.gcr.io/echoserver:1.10 --replicas=3

I would create a yaml file to deploy the webserver instead. Unfortunately, there was something about my yaml file that preventing things from working. That’s when I came across this trick.

  • Step 1: deploy the web server using the kubectl run command.
  • Step 2:  run the following command to get the YAML back for the deployment


kubectl get deployment webserver --output yaml > webserver.yaml

  • Step 3: edit the webserver.yaml file to remove extra lines. For me, I was able to remove:
    •  the status section
    • the annotations section
    • the strategy section
    • etc.

And just keep the following lines (note, note formatted properly):


apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: webserver
name: webserver
namespace: default
spec:
replicas: 3
selector:
matchLabels:
run: webserver
template:
metadata:
labels:
run: webserver
spec:
containers:
- image: k8s.gcr.io/echoserver:1.10
name: webserver

Now, you do not have to edit the file. But I think this is cleaner than the full version that comes back.

So you can delete the deployment that was the result of the command line and instead build future deployments using the yaml file.

Advertisements
Quote

Atoms Shoes: now in quarter sizes


Among other good features of  Atoms Shoes is their availability in quarter sizes. So if you really want an accurate fit, you can get it. They are a nice looking shoe, too. Worth checking out.

Quote

For MacOS users who need a simple and free stopwatch or timer

 This tool seems pretty good. Using it right now.

Quote

Quick and Easy School Night Meals

Not just for people with kids: Giadzy 5 Quick and Easy School Night Meals

Your week is going to be busy enough. You need a meal plan. That list can help.

Quote

For DIY fans looking for something to do this weekend….


I recommend this site and this section of it: Poppytalk – do it yourself

Lots of good projects here. And there’s also a part of the site dedicated to Ikea hacks. Worth checking out.

Quote

Even weekend exercisers get to live longer

Image of person running

Hard to believe, but according to this:

Working out only on the weekends or otherwise compressing your total physical activity into one or two prolonged runs or a single vigorous basketball or soccer game each week could lessen your risks of dying prematurely almost as effectively as more frequent, shorter workouts spread throughout the week, according to an interesting new study of the so-called weekend warrior phenomenon.

So you had a bad week and never hit the gym once. Don’t despair: sneak a weekend workout in and do yourself a favour.

Quote

It’s fall. You need a scarf. Here’s how to tie it

…via the good people at Leffot.

Check out their shoes: they are amazing.