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

move k8s to topic #132

Merged
merged 1 commit into from
Aug 8, 2023
Merged
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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
apiVersion: v1
kind: Namespace
metadata:
name: nginx
"labels": {
"name": "nginx"
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
namespace: nginx
spec:
selector:
app: nginx-deployment
ports:
- protocol: TCP
port: 80
apiVersion: v1
kind: Namespace
metadata:
name: nginx
"labels": {
"name": "nginx"
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
namespace: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
namespace: nginx
spec:
selector:
app: nginx-deployment
ports:
- protocol: TCP
port: 80
targetPort: 80
12 changes: 6 additions & 6 deletions k8s/beginner/GOOD-READ.md → topic/k8s/beginner/GOOD-READ.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Links:
## https://medium.com/google-cloud/kubernetes-110-your-first-deployment-bf123c1d3f8
## https://medium.com/google-cloud/kubernetes-120-networking-basics-3b903f13093a
## https://medium.com/google-cloud/kubernetes-120-networking-basics-3b903f13093a
# Links:
## https://medium.com/google-cloud/kubernetes-110-your-first-deployment-bf123c1d3f8

## https://medium.com/google-cloud/kubernetes-120-networking-basics-3b903f13093a

## https://medium.com/google-cloud/kubernetes-120-networking-basics-3b903f13093a
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4
ports:
- containerPort: 3000
name: http
- containerPort: 22
name: ssh
---
kind: Service #+
apiVersion: v1 #+
metadata: #+
name: gitea-service #+
spec: #+
selector: #+
app: gitea #+
ports: #+
- protocol: TCP #+
targetPort: 3000 #+
port: 80 #+
name: http #+
- protocol: TCP #+
targetPort: 22 #+
port: 22 #+
name: ssh #+
type: NodePort #+ -> Nodeport for local custer, for cloud provider use LoadBalancer option
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4
ports:
- containerPort: 3000
name: http
- containerPort: 22
name: ssh
---
kind: Service #+
apiVersion: v1 #+
metadata: #+
name: gitea-service #+
spec: #+
selector: #+
app: gitea #+
ports: #+
- protocol: TCP #+
targetPort: 3000 #+
port: 80 #+
name: http #+
- protocol: TCP #+
targetPort: 22 #+
port: 22 #+
name: ssh #+
type: NodePort #+ -> Nodeport for local custer, for cloud provider use LoadBalancer option
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 3
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4
ports: #+
- containerPort: 3000 #+
name: http #+
- containerPort: 22 #+
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 3
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4
ports: #+
- containerPort: 3000 #+
name: http #+
- containerPort: 22 #+
name: ssh #+
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 3
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4

apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-deployment
spec:
replicas: 3
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea-container
image: gitea/gitea:1.4
18 changes: 9 additions & 9 deletions k8s/beginner/gitea.yaml → topic/k8s/beginner/gitea.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Pod
metadata:
name: gitea-pod
spec:
containers:
- name: gitea-container-tung
image: gitea/gitea:1.4

apiVersion: v1
kind: Pod
metadata:
name: gitea-pod
spec:
containers:
- name: gitea-container-tung
image: gitea/gitea:1.4
70 changes: 35 additions & 35 deletions k8s/beginner/mysql.yaml → topic/k8s/beginner/mysql.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:5.6
ports:
- containerPort: 3306
# Ignore this for now. It will be explained in the next article
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
---
kind: Service
apiVersion: v1
metadata:
name: mysql-service
spec:
selector:
app: mysql
ports:
- protocol: TCP
port: 3306

apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:5.6
ports:
- containerPort: 3306
# Ignore this for now. It will be explained in the next article
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
---
kind: Service
apiVersion: v1
metadata:
name: mysql-service
spec:
selector:
app: mysql
ports:
- protocol: TCP
port: 3306
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Following: https://www.jenkins.io/doc/book/installing/kubernetes/#install-jenkins-with-helm-v3
# Following: https://www.jenkins.io/doc/book/installing/kubernetes/#install-jenkins-with-helm-v3
Loading