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
brew upgrade ansible | |
mkdir -p /Users/richardsonlima/k8s-digitalocean-ansible/kube-cluster | |
ssh-add ~/.ssh/id_rsa # avoiding ssh key phrase dialog | |
ansible-playbook -i hosts ~/k8s-digitalocean-ansible/kube-cluster/initial.yml | |
ansible-playbook -i hosts ~/k8s-digitalocean-ansible/kube-cluster/kube-dependencies.yml | |
ansible-playbook -i hosts ~/k8s-digitalocean-ansible/kube-cluster/master.yml | |
ansible-playbook -i hosts ~/k8s-digitalocean-ansible/kube-cluster/workers.yml | |
kubectl get nodes | |
kubectl get po --all-namespaces |
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: v1 | |
kind: ConfigMap | |
metadata: | |
namespace: metallb-system | |
name: config | |
data: | |
config: | | |
address-pools: | |
- name: default | |
protocol: layer2 |
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
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.6.2/manifests/metallb.yaml |
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 ( | |
"crypto/tls" | |
"github.com/gorilla/mux" | |
"github.com/justinas/alice" | |
"golang.org/x/crypto/acme/autocert" | |
"log" | |
"net/http" | |
"time" |
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 ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
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
FROM golang:1.9-alpine | |
WORKDIR /opt/ | |
COPY . . | |
RUN go version | |
RUN go build ./webserver-fs.go |
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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
fs := http.FileServer(http.Dir("business")) | |
http.Handle("/", fs) |
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
version: '2' | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql:latest | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=PASSWORD-HERE | |
ports: |
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: v1 | |
kind: Service | |
metadata: | |
name: wordpress-mysql | |
labels: | |
app: wordpress | |
spec: | |
ports: | |
- port: 3306 | |
selector: |
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: v1 | |
kind: Service | |
metadata: | |
name: wordpress | |
labels: | |
app: wordpress | |
spec: | |
ports: | |
- port: 80 | |
selector: |