port kms to kubernetes
This commit is contained in:
parent
6fd25419be
commit
58f8ae10f5
3 changed files with 35 additions and 35 deletions
|
@ -1,35 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: loadbalancer-test
|
||||
# annotations:
|
||||
# metallb.universe.tf/loadBalancerIPs: 192.168.1.100
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
selector:
|
||||
app: loadbalancer-test
|
||||
type: LoadBalancer
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: loadbalancer-test
|
||||
labels:
|
||||
app: loadbalancer-test
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: loadbalancer-test
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: loadbalancer-test
|
||||
spec:
|
||||
containers:
|
||||
- name: loadbalancer-test
|
||||
image: mpepping/cyberchef
|
||||
ports:
|
||||
- containerPort: 8000
|
|
@ -9,6 +9,7 @@
|
|||
kubenix.modules.helm
|
||||
./freshrss.nix
|
||||
./cyberchef.nix
|
||||
./kms.nix
|
||||
];
|
||||
kubernetes.kubeconfig = "~/.kube/config";
|
||||
kubenix.project = "home";
|
||||
|
|
34
nix/flake/kubenix/kms.nix
Normal file
34
nix/flake/kubenix/kms.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
kubernetes.resources = {
|
||||
deployments.kms = {
|
||||
metadata.labels.app = "kms";
|
||||
|
||||
spec = {
|
||||
selector.matchLabels.app = "kms";
|
||||
|
||||
template = {
|
||||
metadata.labels.app = "kms";
|
||||
|
||||
spec.containers.kms = {
|
||||
image = "teddysun/kms";
|
||||
|
||||
ports = [{
|
||||
containerPort = 1688;
|
||||
protocol = "TCP";
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.kms.spec = {
|
||||
type = "LoadBalancer";
|
||||
selector.app = "kms";
|
||||
|
||||
ports = [{
|
||||
port = 1688;
|
||||
targetPort = 1688;
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue