Skip to content

Instantly share code, notes, and snippets.

:shipit:

Matt Dennie mattsdni

  • San Jose, CA
View GitHub Profile
View kubeadm-guide.md

Kubernetes Bare Metal

This guide shows how to install Kubernetes on a bare metal device.

Initial package installation

sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo touch /etc/apt/sources.list.d/kubernetes.list 
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
View fix-rbac.yaml
# Wide open access to the cluster (mostly for kubelet)
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cluster-writer
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
- nonResourceURLs: ["*"]
View k8s-cluster.json
{
"Resources": {
"AWSAutoScalingAutoScalingGroupmasteruseast1amastersmyfirstclusterk8slocal": {
"Type": "AWS::AutoScaling::AutoScalingGroup",
"Properties": {
"AutoScalingGroupName": "master-us-east-1a.masters.myfirstcluster.k8s.local",
"LaunchConfigurationName": {
"Ref": "AWSAutoScalingLaunchConfigurationmasteruseast1amastersmyfirstclusterk8slocal"
},
"MaxSize": 1,
View quine.go
package main
import (
"fmt"
"net/http"
"io/ioutil"
"os"
)
func main() {
View Helm.md

Helm

Helm allows us to bundle together many Kubernetes resources into Charts

Main Concepts

Charts

A Chart is a Helm package. It contains all of the resource definitions necessary to run an application, tool, or service inside of a Kubernetes cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file.

Repositories

A Repository is the place where charts can be collected and shared. It’s like Perl’s CPAN archive or the Fedora Package Database, but for Kubernetes packages.

View bash_profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PATH=~/Library/Python/2.7/bin:$PATH
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/dev
source /usr/local/bin/virtualenvwrapper.sh
if [ -f ~/.git-completion.bash ]; then
You can’t perform that action at this time.