diff --git a/Procfile b/Procfile deleted file mode 100644 index ac9d762..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: python server.py diff --git a/README.md b/README.md index 70cd0dd..f850e53 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # helloworld-python -A Cloud Foundry hello world sample app written in plain Python - no frameworks used +A former Cloud Foundry hello world sample app turned into something that deploys to Kubernetes. + +Deploy with + + kubectl apply -f *.yaml diff --git a/helloworld-ingress.yaml b/helloworld-ingress.yaml new file mode 100644 index 0000000..f77b35e --- /dev/null +++ b/helloworld-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: helloworld-ingress +spec: + rules: + - host helloworld.192.168.33.11.xip.io + http: + paths: + - path: / + pathType: Prefix + backend: + serviceName: helloworld-nodeport + servicePort: 8080 diff --git a/helloworld-nodeport.yaml b/helloworld-nodeport.yaml new file mode 100644 index 0000000..0f96800 --- /dev/null +++ b/helloworld-nodeport.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: helloworld + name: helloworld-nodeport +spec: + ports: + - name: 8080-80 + port: 80 + protocol: TCP + targetPort: 8080 + selector: + app: helloworld + type: NodePort +status: + loadBalancer: {} diff --git a/helloworld.yaml b/helloworld.yaml new file mode 100644 index 0000000..cd28958 --- /dev/null +++ b/helloworld.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: helloworld + name: helloworld +spec: + replicas: 1 + selector: + matchLabels: + app: helloworld + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: timhelloworld + spec: + containers: + - image: timirnich/timhelloworld:0.5 + name: helloworld + resources: {} +status: {} diff --git a/manifest.yml b/manifest.yml deleted file mode 100644 index 5d66a3b..0000000 --- a/manifest.yml +++ /dev/null @@ -1,9 +0,0 @@ -applications: -- name: pythonhelloworld - buildpacks: - - python_buildpack - random-route: true - memmory: 128M - command: python server.py - services: - env: diff --git a/runtime.txt b/runtime.txt deleted file mode 100644 index 1052ccb..0000000 --- a/runtime.txt +++ /dev/null @@ -1 +0,0 @@ -python-3.x