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 |
bla bla
kubectl apply ...
Copyright 2019
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
| ## compile kubectl | |
| ./hack/build-go.sh | |
| ./hack/build-go.sh cmd/kubectl | |
| KUBE_VERBOSE=9 V=9 make --no-print-directory -C ./hack/.. all WHAT=cmd/kubectl | |
| ./hack/make-rules/build.sh cmd/kubectl |
Docker just opensourced compose-on-kubernetes (COK for short), and I wanted to run on GKE. This is the jurney:
You will be able to use plain-old-compose files against k8s. Actually the docker-compose.yml have to be transformed to a Stack CustomResourceDefinition, and than a controller will take care of creating the all the necesseary k8s resources (deployments, services)
You can create those CRDs in 2 ways:
- rancher: rio?