Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finaliza ejemplo con k8s #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions k8s/artista/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ MAINTAINER "Frans van Dunné" [email protected]
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
# Fix this to match debian instead of ubuntu
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
RUN service ssh restart

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

Expand Down
81 changes: 81 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: organizador
namespace: mlops
spec:
selector:
matchLabels:
app: ralparque
replicas: 1
template:
metadata:
labels:
app: ralparque
spec:
containers:
- name: organizador
image: localhost:32000/organizador:v0.0.2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mana
namespace: mlops
spec:
selector:
matchLabels:
app: ralparque
artista: mana
replicas: 3
template:
metadata:
labels:
app: ralparque
artista: mana
spec:
containers:
- name: mana
image: localhost:32000/artista:v0.0.4
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fabulosos-cadillacs
namespace: mlops
spec:
selector:
matchLabels:
app: ralparque
artista: fabulosos-cadillacs
replicas: 1
template:
metadata:
labels:
app: ralparque
artista: fabulosos-cadillacs
spec:
containers:
- name: fabulosos-cadillacs
image: localhost:32000/artista:v0.0.4
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: aterciopelados
namespace: mlops
spec:
selector:
matchLabels:
app: ralparque
artista: aterciopelados
replicas: 1
template:
metadata:
labels:
app: ralparque
artista: aterciopelados
spec:
containers:
- name: aterciopelados
image: localhost:32000/artista:v0.0.4
21 changes: 0 additions & 21 deletions k8s/deployment.yml

This file was deleted.

50 changes: 45 additions & 5 deletions k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,57 @@
kind: Service
apiVersion: v1
metadata:
name: ralparque
namespace: dev
name: organizador
namespace: mlops
spec:
selector:
type: ralparque
k8s-app: ralparquea
k8s-app: ralparque
type: NodePort
ports:
- name: http
nodePort: 308080
port: 8080
targetPort: 8080
protocol: TCP

---
apiVersion: v1
kind: Service
metadata:
name: mana
namespace: mlops
labels:
artista: mana
spec:
clusterIP: None
ports:
- port: 22
selector:
artista: mana
---
apiVersion: v1
kind: Service
metadata:
name: fabulosos-cadillacs
namespace: mlops
labels:
artista: fabulosos-cadillacs
spec:
clusterIP: None
ports:
- port: 22
selector:
artista: fabulosos-cadillacs
---
apiVersion: v1
kind: Service
metadata:
name: aterciopelados
namespace: mlops
labels:
artista: aterciopelados
spec:
clusterIP: None
ports:
- port: 22
selector:
artista: aterciopelados