-
-
Save xgenvn/c129d3719349b3328f95ac4ee476e1af to your computer and use it in GitHub Desktop.
Simple Hands-on Introduction to K3S - Lightweight Kubernetes
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: whoareyou-deployment | |
| namespace: default | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: | |
| app: whoareyou | |
| template: | |
| metadata: | |
| labels: | |
| app: whoareyou | |
| spec: | |
| containers: | |
| - name: whoareyou-container | |
| image: containous/whoami | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: whoareyou-service | |
| namespace: default | |
| spec: | |
| ports: | |
| - name: http | |
| targetPort: 80 | |
| port: 80 | |
| selector: | |
| app: whoareyou | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: whoareyou-ingress | |
| namespace: default | |
| annotations: | |
| kubernetes.io/ingress.class: traefik | |
| spec: | |
| rules: | |
| - host: whoareyou.localhost | |
| http: | |
| paths: | |
| - path: / | |
| backend: | |
| serviceName: whoareyou-service | |
| servicePort: http |
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: k3s.cattle.io/v1 | |
| kind: HelmChart | |
| metadata: | |
| name: traefik | |
| namespace: kube-system | |
| spec: | |
| chart: stable/traefik | |
| set: | |
| rbac.enabled: "true" | |
| ssl.enabled: "true" | |
| dashboard.enabled: "true" | |
| dashboard.domain: "dashboard.localhost" | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: dashboard-ingress | |
| namespace: kube-system | |
| annotations: | |
| kubernetes.io/ingress.class: traefik | |
| spec: | |
| rules: | |
| - host: dashboard.localhost | |
| http: | |
| paths: | |
| - path: / | |
| backend: | |
| serviceName: dashboard-service | |
| servicePort: http |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment