# Replace <> with real values
$ kubectl create secret generic kubebot --from-literal=token=<your-bot-token> --from-literal=channel=<channel-id>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| // hello world, the web server | |
| func HelloServer(w http.ResponseWriter, r *http.Request) { | |
| fmt.Fprintf(w, "Hello, world!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: kubebot | |
| labels: | |
| component: kubebot | |
| spec: | |
| replicas: 1 | |
| template: | |
| metadata: |
# List dynamic dependencies (shared libraries):
# 1. if it's dynamically linked, you'll see
$ ldd kompose
linux-vdso.so.1 => (0x00007ffe937ea000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0a7dae5000)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all" | |
| $ git lol | |
| * 9f0349d (HEAD, origin/master, origin/HEAD, master) Now finally does frickin pull first. | |
| * 1cc98b0 Added auto-update. | |
| * 405970a Initial import. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [credential] | |
| helper = cache --timeout=99999999999999999 | |
| [user] | |
| name = Firstname Lastname | |
| email = [email protected] | |
| [alias] | |
| lol = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
| glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
| log-file = log --follow --color -- | |
| co = checkout |
Please comment below if you are using Kubernetes Third-Party Resources and I will add you to the list.
Known Users:
- Rook Operator: https://github.com/rook/rook/tree/master/demo/kubernetes
- Elasticsearch Operator: https://github.com/upmc-enterprises/elasticsearch-operator
- Etcd Operator: https://coreos.com/blog/introducing-the-etcd-operator.html
- Prometheus Operator: https://coreos.com/blog/the-prometheus-operator.html
- CoreOS Tectonic: https://coreos.com/tectonic
- Kelsey Hightower's kube-cert-manager: https://github.com/kelseyhightower/kube-cert-manager
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }OlderNewer