Last active
November 9, 2022 16:38
-
-
Save wuhanstudio/2564cac1e3658b5729b002652bb561da to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. | |
# | |
# By default this script does nothing. | |
dhclient enp2s0f0 | |
exit 0 |
This file contains 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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: hello-ingress | |
spec: | |
rules: | |
- host: hello.wuhanstudio.local | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: hello-world | |
port: | |
name: web |
This file contains 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: hello-world | |
labels: | |
app: hello | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello | |
template: | |
metadata: | |
labels: | |
app: hello | |
spec: | |
containers: | |
- image: tutum/hello-world:latest | |
name: hello-world | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hello-world | |
spec: | |
ports: | |
- name: web | |
port: 80 | |
targetPort: 80 | |
selector: | |
app: hello | |
type: ClusterIP |
This file contains 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
0. Proxmox (FQDN) | |
$ chmod +x /etc/rc.local | |
$ systemctl daemon-reload | |
$ systemctl start rc-local | |
$ systemctl status rc-local | |
1. k3sup join (hostname) | |
2. MetalLB | |
$ kubctl apply -f metallb-install.yml | |
$ kubectl apply -f metallb-config.yml | |
3. Application | |
$ kubectl apply -f hello-world.yml | |
4. Certificate | |
kubectl describe secret hello-tls | |
4. Helm (traefik) | |
$ helm install traefik ./ | |
$ kubectl apply -f hello-ingress.yml |
This file contains 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: metallb.io/v1beta1 | |
kind: IPAddressPool | |
metadata: | |
name: first-pool | |
namespace: metallb-system | |
spec: | |
addresses: | |
- 192.168.1.200-192.168.1.254 | |
--- | |
apiVersion: metallb.io/v1beta1 | |
kind: L2Advertisement | |
metadata: | |
name: example | |
namespace: metallb-system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment