Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mkdocs] Use mkdocs for website #105

Merged
merged 9 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/conftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
tar xzf conftest_0.24.0_Linux_x86_64.tar.gz
sudo mv conftest /usr/local/bin
- name: conftest
working-directory: open-policy-agent
working-directory: contents/open-policy-agent
run: |
conftest test conftest/manifests/valid/* --policy conftest/policy
5 changes: 3 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
pull_request:
paths:
- .github/workflows/e2e.yml
- test/**
- kuttl-test.yaml
- contents/test/**
- contents/kuttl-test.yaml

jobs:
e2e:
Expand Down Expand Up @@ -42,4 +42,5 @@ jobs:
kubectl kuttl -v

- name: kuttl - run
working-directory: contents
run: kubectl kuttl test
16 changes: 16 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: github-pages

on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ kubeconfig
*.csr
service-account-key.pem
service-account.pem
default.etcd
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "autoscaler/hpa/custom-metrics/k8s-prom-hpa"]
path = autoscaler/hpa/custom-metrics/k8s-prom-hpa
[submodule "contents/autoscaler/hpa/custom-metrics/k8s-prom-hpa"]
path = contents/autoscaler/hpa/custom-metrics/k8s-prom-hpa
url = https://github.com/stefanprodan/k8s-prom-hpa.git
[submodule "kubeadm-local/certified-kubernetes-administrator-course"]
path = kubeadm-local/certified-kubernetes-administrator-course
[submodule "contents/kubeadm-local/certified-kubernetes-administrator-course"]
path = contents/kubeadm-local/certified-kubernetes-administrator-course
url = [email protected]:kodekloudhub/certified-kubernetes-administrator-course.git
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repos:
args: [--allow-multiple-documents]
exclude: |
(?x)(
^strimzi/base-0.18.0/|
^helm-vs-kustomize/helm-example/|
^helm/hello-world/|
README.md$
^contents/strimzi/base-0.18.0/|
^contents/helm-vs-kustomize/helm-example/|
^contents/helm/hello-world/|
contents/README.md$
)
# - id: check-added-large-files
262 changes: 34 additions & 228 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# kubernetes-training
# Kubernetes Training

- Read on Website: https://www.nakamasato.com/kubernetes-training
- Read on GitHub: [contents/README.md](contents/README.md) (All files were moved to `contents` in [#105](https://github.com/nakamasato/kubernetes-training/pull/105))
# Versions

1. Kubernetes: [v1.21.2](https://github.com/kubernetes/kubernetes/releases/tag/v1.21.2) (released on 2021-06-18)
Expand All @@ -20,260 +22,64 @@
# Contents

1. Kubernetes Cluster
1. [kubernetes-the-hard-way](kubernetes-the-hard-way)
1. [Kubeadm in local](kubeadm-local)
1. [kind](local-cluster/kind)
1. [Kubernetes Features](kubernetes-features)
1. [Autoscaler HPA with custom metrics](autoscaler/hpa/custom-metrics)
1. [amazon-eks-workshop](eksworkshop)
1. kubernetes-the-hard-way
1. Kubeadm in local
1. kind
1. Kubernetes Features
1. Autoscaler HPA with custom metrics
1. amazon-eks-workshop
1. Kubernetes Components
1. [kubernetes-scheduler](kubernetes-components/kubernetes-scheduler)
1. [etcd](kubernetes-components/etcd)
1. [kube-apiserver](kubernetes-components/kube-apiserver)
1. [kube-controller-manager](kubernetes-components/kube-controller-manager)
1. kubernetes-scheduler
1. etcd
1. kube-apiserver
1. kube-controller-manager
1. kube-proxy
1. kubelet
1. Kubernetes Extensions
1. [kubernetes-operator](kubernetes-operator)
1. [kubernetes-scheduler](kubernetes-extensions/kubernetes-scheduler)
1. kubernetes-operator
1. kubernetes-scheduler
1. [plugins (todo)](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)
1. Deloyment Managemet
1. [Knative](knative)
1. Knative
1. [Skaffold (todo)](https://skaffold.dev/)
1. Networking
1. [traefik](traefik)
1. [ingress-nginx-controller](ingress-nginx-controller)
1. traefik
1. ingress-nginx-controller
1. Middleware (Operator)
1. [strimzi](strimzi)
1. [eck](eck)
1. strimzi
1. eck
1. Service Proxy, Discovery, and, Mesh
1. [istio](istio)
1. istio
1. Monitoring
1. [Prometheus](prometheus)
1. [Prometheus Operator](prometheus-operator)
1. Prometheus
1. Prometheus Operator
1. [Thanos (todo)] https://thanos.io/
1. [Grafana](grafana)
1. [Grafana Operator](grafana-operator)
1. [Grafana Loki](loki)
1. Grafana
1. Grafana Operator
1. Grafana Loki
1. [Grafana Tempo (todo)] https://grafana.com/docs/tempo/latest/
1. [Jaeger (todo)] https://www.jaegertracing.io/
1. Security
1. [open-policy-agent](open-policy-agent)
1. open-policy-agent
1. Yaml Management
1. [Helm](helm)
1. [Helm vs Kustomize](helm-vs-kustomize)
1. Helm
1. Helm vs Kustomize
1. CI/CD
1. [Conftest](open-policy-agent/conftest)
1. [ArgoCD](argocd)
1. Conftest
1. ArgoCD
1. Kyverno https://kyverno.io/
1. Polaris https://www.fairwinds.com/polaris
1. Machine Learning
1. [kubeflow](https://github.com/nakamasato/kubeflow-training)
1. [Databases](databases)
1. Databases
1. [Vitess] https://github.com/vitessio/vitess
1. [TiDB] https://github.com/pingcap/tidb
1. [TimescaleDB] https://github.com/timescale/timescaledb-kubernetes
1. [mysql-operator](databases/mysql-operator)
1. [postgres-operator](databases/postgres-operator)
1. mysql-operator
1. postgres-operator
# Cloud Native Trail Map

- https://github.com/cncf/trailmap
- https://www.cncf.io/blog/2018/03/08/introducing-the-cloud-native-landscape-2-0-interactive-edition/

![alt text](https://github.com/cncf/trailmap/blob/master/CNCF_TrailMap_latest.png?raw=true)

## 1. CONTAINERIZATION

1. [Containers 101: attach vs. exec - what's the difference?](https://iximiuz.com/en/posts/containers-101-attach-vs-exec/)
## 2. CI/CD

### 2.1 [ArgoCD](argocd)
## 3. ORCHESTRATION & APPLICATION DEFINITION

### 3.1 Kubernetes

#### Useful Commands

- DNS
```
kubectl apply -f https://k8s.io/examples/admin/dns/dnsutils.yaml
kubectl exec -i -t dnsutils -- nslookup kubernetes.default
```
- [Debug with ephemeral containers](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-running-pod/#ephemeral-container-example) (alpha in 1.22, beta in 1.23)
```
kubectl run ephemeral-demo --image=k8s.gcr.io/pause:3.1 --restart=Never
kubectl debug -it ephemeral-demo --image=busybox --target=ephemeral-demo
```
- Create pod with busyboxy-curl
```
kubectl run -it --rm=true busybox --image=yauritux/busybox-curl --restart=Never
```

#### Set up Kubernetes Cluster with kubeadm (local)

[kubeadm-local](kubeadm-local)
#### Set up Kubernetes Cluster on GCP (kubernetes-the-hard-way)

[Kubernetes The Hard Way](https://github.com/kelseyhightower/kubernetes-the-hard-way)

#### Kubernetes Components

1. [kubernetes-scheduler](kubernetes-components/kubernetes-scheduler)
1. [etcd](kubernetes-components/etcd)
1. kube-apiserver
1. kube-controller-manager
1. kube-proxy
1. kubelet

#### [More Practices of Applications on Kubernetes](PRACTICE.md)

### 3.2 [Helm](helm)

1. Create Helm chart.

```
helm create <chart-name e.g. helm-example>
```

1. Update files under `templates` and `values.yaml`
1. Test apply.

```
helm install helm-example --debug ./helm-example
```

1. Make a package.

```
helm package helm-example
```

1. Create repository and set index.

```
helm repo index ./ --url https://nakamasato.github.io/helm-charts-repo
```

1. Install a chart.

```
helm repo add nakamasato https://nakamasato.github.io/helm-charts-repo
helm repo update # update the repository info
helm install example-from-my-repo nakamasato/helm-example
```

## 4. OBSERVABILITY & ANALYTICS

### 4.1. [Prometheus](prometheus)

![](prometheus/prometheus.drawio.svg)
### 4.2. [Prometheus Operator](prometheus-operator)

### TBD
- fluentd
- Jaeger
- Open Tracing

## 5. SERVICE PROXY, DISCOVERY & MESH

### 5.1. [Istio](istio)

### TBD
- envoy
- CoreDNS
- Linkerd

## 6. NETWORKING, POLICY & SECURITY

### 6.1 [Open Policy Agent](open-policy-agent)

### [gatekeeper](https://github.com/open-policy-agent/gatekeeper)

1. Install gatekeeper

```
kubectl apply -f https://raw.githubusercontent.com/open-policy-agent/gatekeeper/master/deploy/gatekeeper.yaml
```

1. Create `ConstraintTemplate`
1. Create custom policy defined in the previous step.

### [conftest](https://github.com/open-policy-agent/conftest)

1. Write policy in `policy` directory.

```rego
deny[msg] {
input.kind = "Deployment"
not input.spec.template.spec.nodeSelector
msg = "Deployment must have nodeSelector"
}
```

1. Write tests in the same directory.

```rego
test_no_nodeSelector {
deny["Deployment must have nodeSelector"] with input as
{
"kind": "Deployment",
"spec": {
"template": {
"spec": {
"containers": [
],
}
}
}
}
}
```

1. Run test.

```
conftest verify

1 tests, 1 passed, 0 warnings, 0 failures, 0 exceptions
```

1. Validate a manifest file.

```
conftest test manifests/valid/deployment.yaml

1 tests, 1 passed, 0 warnings, 0 failures, 0 exceptions
```

### TBD
- CNI
- falco

## 7. DISTRIBUTED DATABASE & STORAGE

### 7.1. [etcd](kubernetes-components/etcd)
### TBD
- [Vitess](https://github.com/vitessio/vitess)
- Rook
- [TiDB](https://github.com/pingcap/tidb)
- [TimescaleDB](https://github.com/timescale/timescaledb-kubernetes)

## 8. STREAMING & MESSAGING

### TBD
- gRPC
- NATS
- cloudevents

## 9. CONTAINER REGISTRY & RUNTIME

### TBD
- containerd
- harbor
- cri-o

## 10. SOFTWARE DISTRIBUTION

### TBD
- TUF
- notaru
1 change: 0 additions & 1 deletion autoscaler/hpa/custom-metrics/k8s-prom-hpa
Submodule k8s-prom-hpa deleted from 2dbaab
File renamed without changes.
Loading