Adding the Kubernetes dashboard to Docker for Mac

A simple way to add the Kubernetes dashboard, which can be helpful to folks new to Kubernetes. Docker for Mac (edge) doesn’t ship with it in place. In your terminal type the following. I am assuming you have Kubernetes running and kubectl installed and on your path.

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl get pods --namespace=kube-system

At this point you should see a line with a name that starts with “kubernetes-dashboard-” and some identifier. Modify the line below to match:

kubectl port-forward kubernetes-dashboard-7798c48646-wkgk4 8443:8443 -- namespace=kube-system &

Then your browser should load the dashboard on the port you specified (it will yell at you about the untrusted cert).

Just for clarity, the kubernetes-dashboard.yaml looks like the below as I write this, copied from the link above.

# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Configuration to deploy release version of the Dashboard UI compatible with
# Kubernetes 1.8.
#
# Example usage: kubectl create -f 

# ------------------- Dashboard Secret ------------------- #

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard-certs
  namespace: kube-system
type: Opaque

---
# ------------------- Dashboard Service Account ------------------- #

apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system

---
# ------------------- Dashboard Role & Role Binding ------------------- #

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: kubernetes-dashboard-minimal
  namespace: kube-system
rules:
  # Allow Dashboard to create 'kubernetes-dashboard-key-holder' secret.
- apiGroups: [""]
  resources: ["secrets"]
  verbs: ["create"]
  # Allow Dashboard to create 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
  resources: ["configmaps"]
  verbs: ["create"]
  # Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]
  resources: ["secrets"]
  resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs"]
  verbs: ["get", "update", "delete"]
  # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
  resources: ["configmaps"]
  resourceNames: ["kubernetes-dashboard-settings"]
  verbs: ["get", "update"]
  # Allow Dashboard to get metrics from heapster.
- apiGroups: [""]
  resources: ["services"]
  resourceNames: ["heapster"]
  verbs: ["proxy"]
- apiGroups: [""]
  resources: ["services/proxy"]
  resourceNames: ["heapster", "http:heapster:", "https:heapster:"]
  verbs: ["get"]

---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: kubernetes-dashboard-minimal
  namespace: kube-system
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: kubernetes-dashboard-minimal
subjects:
- kind: ServiceAccount
  name: kubernetes-dashboard
  namespace: kube-system

---
# ------------------- Dashboard Deployment ------------------- #

kind: Deployment
apiVersion: apps/v1beta2
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: kubernetes-dashboard
  template:
    metadata:
      labels:
        k8s-app: kubernetes-dashboard
    spec:
      containers:
      - name: kubernetes-dashboard
        image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1
        ports:
        - containerPort: 8443
          protocol: TCP
        args:
          - --auto-generate-certificates
          # Uncomment the following line to manually specify Kubernetes API server Host
          # If not specified, Dashboard will attempt to auto discover the API server and connect
          # to it. Uncomment only if the default does not work.
          # - --apiserver-host=http://my-address:port
        volumeMounts:
        - name: kubernetes-dashboard-certs
          mountPath: /certs
          # Create on-disk volume to store exec logs
        - mountPath: /tmp
          name: tmp-volume
        livenessProbe:
          httpGet:
            scheme: HTTPS
            path: /
            port: 8443
          initialDelaySeconds: 30
          timeoutSeconds: 30
      volumes:
      - name: kubernetes-dashboard-certs
        secret:
          secretName: kubernetes-dashboard-certs
      - name: tmp-volume
        emptyDir: {}
      serviceAccountName: kubernetes-dashboard
      # Comment the following tolerations if Dashboard must not be deployed on master
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule

---
# ------------------- Dashboard Service ------------------- #

kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system
spec:
  ports:
    - port: 443
      targetPort: 8443
  selector:
    k8s-app: kubernetes-dashboard
Advertisements

How we should be…

I came across this article because, in the Internet sense of knowing someone, I know the author. I can assure you that neither of us would know the other if we sat across a table from each other, but I purchase books and tools from her husband’s companies and then the Internet takes over.

So autism. It’s not easy on the parents, it’s not easy on the child, and without kindness from others it’s a total mess. There. I’ve wrapped a heart wrenching and complicated topic in a few short sentences. Time for you to read: Cutting with kindness.

That’s a beautiful story. But let’s extract the autism for a moment. When I was growing up one of the things I was taught was “patience”. Now patience, like all things, has a balance to it. There’s the “it’s not all about you” patience. And then there’s the “put up with other’s crap” patience.

I know I’m far less patient (both kinds) with my family than with not family or strangers. I expect more from the people closest to me, and so I have less patience with their needs. And, of course, I feel safer expressing myself in glorious detail, dissecting exactly how their actions affect me with possible means for rectification. Feels kinda backwards to me right now after reading that story. As I’ve said before, living an examined life is a PITA.

The lesson here however is not in being more patient, kinder, and understanding to children with autism. Although everyone should be more understanding of the families it’s not my point. Also, there will always some people whose problems are too deep—who will take whatever you offer no matter how much. Let’s avoid discussing that problem…it’s one side of the bell curve. So, the point is… it can only improve my life to continue to be ever more aware of people’s needs and respond kindly, thoughtfully, with ever greater awareness.

FCC ignored your net neutrality comment, unless you made a ‘serious’ legal argument – The Verge

FCC ignored your net neutrality comment, unless you made a ‘serious’ legal argument – The Verge:

But even ignoring the potential spam, the commission said it didn’t really care about the public’s opinion on net neutrality unless it was phrased in unique legal terms. The vast majority of the 22 million comments were form letters, the official said, and unless those letters introduced new facts into the record or made serious legal arguments, they didn’t have much bearing on the decision. The commission didn’t care about comments that were only stating opinion.

…this isn’t an open vote. It’s a deliberative process that weighs a lot of different factors to create policy that balances the interests of many stakeholders. But it still feels brazen hearing the commission staff repeatedly discount Americans’ preference for consumer protections, simply because they aren’t phrased in legal terms.

[So in order to make my point I needed to hire a lawyer to make the argument “This sucks for everyone but the giant ISPs” and write it in legalese? And also, the argument that this is a return to how it was in the past is wrong on two counts. One, they were regulated, and I think fairly strongly in the Clinton era, but further—times have changed.

The “internet” is a much as service as other utilities. In fact more so. You can choose to generate your own power in a number of ways. And you can choose to buy a property with a well, or other water sources and not be connected to the utilities. You can tank in ng or propane. But you can’t enjoy the Internet as we know it today without everyone playing fairly. And the ex-Verizon lawyer who is the current Chair of the FCC can’t possibly fail to see that the companies that offer this utility need to be treated like utilities, if not the mother of all utilities. And the “nyah. nyah. we can’t hear you unless you write in legalize” stuff is just galling.]

Morning rituals

I have long envied people who stick to their morning rituals. Or maybe they rely on them. I find the world highly ephemeral. I try not to rely on anything I don’t feel compelled to rely upon.

So I’ve watched over the years, now that people share, in the Instagram perfection of it all, their rituals, if not daily, then at least over time what appears to be a daily thing.

The first action of the day might be making coffee. They grind, froth, stir, and ease into their day. Some get kitted up and cycle to their favorite spot where they meet others of similar ilk and collectively drink and eat a bite of something before whisking off on their daily ride.

Lots of folks I know head quietly to their workshop of choice. Wood, pottery, metal–it matters not. They spend some time making things that they or others may cherish for years to come, a tribute before heading off to work. Sometimes it’s a wish, a hope, or prayer that they can spend more time doing the creative activity they love.

My mornings have been defined by external factors for a long time. Garbage and recycling 3 times a week. Getting DaKid™ on the school bus. Sometimes commuting. But not much in the way of taking a few moments to greet the day.

I have a pile of gifts that I’ve been making in my little wood shop for a while. Some of the folks have been waiting years for their gifts to be completed. Sad. So terribly sad. Last year and now this year have been banner years for completing projects. Bookcases, a dining room table, and now the gifts are all being finished. And while it’s a tiny fraction of what it used to be, I’m even working on some new music.

I find new rituals establishing themselves. After taking care of the other stuff (garbage, School bus, etc.) I make my way to the shop and spend a few minutes adding another coat of shellac to a board. Or some other not very risky task. Risk takes time. I need to be able to back away, think, come at it again. There’s little time for that in my morning.

Shellac is a beautiful finish. A bit high maintenance for some, but beautiful. I use very thin coats and many of them. Each day another thin layer is applied. It’s probably dry in ten of fifteen minutes, but work beckons, and so I don’t make it back there until the end of the day. It is ritualistic. I go down there, flick on the lights, put one glove on like a drunken surgeon, uncap the canning jars, one with shellac, one with the cloth pad. A few swipes later, and I’m done for now. The jars are lidded, and the glove, turned inside out as I remove it, goes in the trash.

More recently, as I began composing some new music, I started practicing again. I sit down, grab an instrument, turn on the metronome and lose myself in exercises for 15 or 20 minutes. Amazingly peaceful for me. A touchstone from an older aspect of my life and a meditation. And probably something I should every day for the rest of my life. It’s not “playing” or “performing”. It’s a simple discipline where I work toward increasing facility. Playing things that are hard for me now until they become smooth and easy. A new picking technique. A hard to play phrase. A difficult intervalic leap. A few concentrated minutes that stops time outside of my focus before the day is in full swing. A morning ritual.

First coat on the bottom… Just before, I knocked back the top's two coats with a #3000 grit automotive pad. I know it has its limitations...but shellac is such a beautiful finish. #whisperworkshop #handwork #handtools #woodworking #woodwork #everythingmatters

And the news became important…

Dave Winer: RSS on the desktop, 15 years later

Distilled, in a tweet, this is what it’s about to me. “One of the most patriotic things you can do is to upgrade the quality and breadth of the news you read. Invest in your personal news flow.”

Even just a few months ago, that statement would have seemed arrogant, even unhinged. But today we know that control of information flow is essential to basically everything. It will be even more so in the future.

That’s the anthem of my new product, Electric River. It’s now available for the Mac, hopefully soon on other desktop platforms. It boots up reading the feeds I set it up to read. But you can and should make it your own. I want to work on making feed discovery better next, but for right now, you can build your own news network and you don’t have to be a rocket scientist to make it work.

[Dave’s vision for this has been clear for very long time, but is as fresh as ever. So, if you’re reading this, and you’ve been actively seeking and sharing stories in places like Facebook, do yourself a favor and try this out. Seek the news feeds that you find important and add them in. Most of all, continue to seek the truth that lies beneath the reporting, editing, and biases.]

The Schrödinger’s cat of imperfection is perfection

The Universe’s Most Enigmatic Frame Builder | Bicycling:

BS: As far as I’ve been able to tell, the rider is not going to experience the imperfection—everyone I’ve talked to who rides your bikes says they’re exquisite. And the imperfections are not even something other highly skilled builders notice easily or at all. There’s no practical reason to try to exceed that.

RS: Yeah, the thing about it is… it doesn’t matter at all.

BS: Right—and you also cannot succeed at what you’re trying to do. You go into it knowing you’re going to fail, so—

RS: Well, when you start, every time you start, you have a chance. You also know you won’t do it. Both things exist for you at that moment. And for some time as the heat and the metal and the human element interface, both possibilities stay alive, and that is… Look, ultimately, yes, you get to some point where you concede, but that doesn’t mean you shouldn’t… you know… you…

[and then]

BS: So the point isn’t to make a perfect bike but to be a human and to make a perfect bike? Or is the inevitable imperfection itself the perfect part, because it represents that struggle, the human part?

RS: This is the point where we are beyond reason. And probably beyond answers.

BS: Why should a buyer care about your struggle? Why not just go out and buy the perfect bike?

RS: I can only make one file cut and once that cut is made, I can’t put the material back. That’s what people are paying for. I think that makes a bicycle more beautiful.

[This conversation so nails how I feel but fail to express about everything I’ve ever worked on, built, made, and achieved. Richard Sachs pushes everyone who makes anything forward, and while some have their shortsighted view of his stance and explanation, I see the way forward.

While I’m certain, having seen his bikes first hand, that owning one would be a joy, and riding one regularly a double joy, I don’t need to. That is, that the process toward mastery doesn’t require ownership by me. That he continues to chase mastery and perfection is what I need, although I admit, it’s not as visceral.]