Its much easier to understand how kustomize work if you see some pictures ...
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
{ | |
"orders":[ | |
{ | |
"id": 1, | |
"user": "lalyos", | |
"food": "pacal" | |
}, | |
{ | |
"id": 2, | |
"user": "geza", |
Sometimes a very simple prompt is useful - like creating documentation, or github issues. In those cases its still important to be able to tell the k8s context/ns
white [ctx/ns]
PS1='[$(kubectl config view --minify -o jsonpath="{.contexts[0].name}:{.contexts[0].context.namespace}")]$ '
orange [ns]
Fake/Quick rest api prototype by combinig:
- json-server for rest api
- restangular for admin UI
docker run -d \
--name json-server \
-p 3000:3000 \
lalyos/json-server https://gist.githubusercontent.com/lalyos/2be21105e3607b4981c85a542cedc7fc/raw/issues.json
kubectl apply -f https://gist.githubusercontent.com/lalyos/1f70f30127ae88be6deaa3f12b377f69/raw/secret-app.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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: bad-app | |
spec: | |
replicas: 0 | |
selector: | |
matchLabels: | |
app: bad | |
template: |
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: | |
creationTimestamp: null | |
labels: | |
app: lunch | |
name: lunch | |
spec: | |
type: NodePort | |
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: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: web | |
spec: | |
rules: | |
- host: web.$NS.ing.k8z.eu | |
http: | |
paths: | |
- backend: |
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: '3' | |
services: | |
server: | |
# v0.2.0-rc5 | |
# v0.1.0-rc1 | |
image: rancher/k3s:v0.5.0 | |
command: server --disable-agent | |
environment: | |
- K3S_CLUSTER_SECRET=somethingtotallyrandom | |
- K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml |