Sign inSign up

janben/k8s-devops-tools

By janben

Updated about 3 years ago

An image that can be used for connectivity testing, primarily in a Kubernetes cluster

Image
0

43

janben/k8s-devops-tools repository overview

K8S Containerized DevOps Toolkit

Functionality & Instruction

Web Server

The web site can be reached using port 80 or 443. Modify the contents in the (redirected) folder /var/www/html.

MS SQL Client

There is a MS SQl Server client (mssql-tools18) installed. Use the command 'sqlcmd' to access a SQL Server instance.

Example:

sqlcmd -S HOSTNAME_OF_SQLSERVER -U USERNAME -P 'PASSWORD'
TCP Proxy

The nginx instance can be used as a TCP proxy, for instance to access a remote SQL Server instance. Place configuration files in the (redirected) folder /etc/nginx/stream-conf.d.

Runtime

Docker

Example container creation:

  • Linux:
docker run -d --name k8s-devops-tools -p 50080:80 -p 50443:443 -p 50434:1433 -v $(pwd)/nginx/webroot:/var/www/html -v $(pwd)/nginx/sites-available:/etc/nginx/sites-available -v $(pwd)/nginx/sites-enabled:/etc/nginx/sites-enabled -v $(pwd)/nginx/conf.d:/etc/nginx/conf.d -v $(pwd)/nginx/stream-conf.d:/etc/nginx/stream-conf.d -v $(pwd)/nginx/certs:/etc/nginx/certs janben/k8s-devops-tools
  • Windows Powershell:
docker run -d --name k8s-devops-tools -p 50080:80 -p 50443:443 -p 50434:1433 -v ${PWD}/nginx/webroot:/var/www/html -v ${PWD}/nginx/sites-enabled:/etc/nginx/sites-enabled -v ${PWD}/nginx/sites-available:/etc/nginx/sites-available -v ${PWD}/nginx/conf.d:/etc/nginx/conf.d -v ${PWD}/nginx/stream-conf.d:/etc/nginx/stream-conf.d -v ${PWD}/nginx/certs:/etc/nginx/certs janben/k8s-devops-tools
Kubernetes

Use the following YAML to deploy in a Kubernetes cluster:

apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-devops-tools
labels:
    app: k8s-devops-tools
spec:
selector:
    matchLabels:
    app: k8s-devops-tools
replicas: 1
template:
    metadata:
    labels:
        app: k8s-devops-tools
    spec:
    containers:
        - name: k8s-devops-tools
        image: janben/k8s-devops-tools
        resources:
            limits:
            memory: "500Mi"
            cpu: "500m"
        imagePullPolicy: "IfNotPresent"
        ports:
        - containerPort: 80
            name: http
        - containerPort: 443
            name: https
        - containerPort: 1433
            name: ms‑sql‑s
        volumeMounts:
        - name: webroot
            mountPath: /var/www
            subPath: html
        - name: conf
            mountPath: /etc/nginx
            subPath: conf.d
        - name: stream-conf
            mountPath: /etc/nginx
            subPath: stream-conf.d
        - name: certs
            mountPath: /etc/nginx
            subPath: certs
---
apiVersion: v1
kind: Service
metadata:
name: k8s-devops-tools-http
labels:
    app: k8s-devops-tools
spec:
type: ClusterIP
selector:
app: k8s-devops-tools
ports:
- port: 80
    name: http
    targetPort: 80
- port: 443
    name: https
    targetPort: 443
- port: 1433
    name: ms‑sql‑s
    targetPort: 1433

Tag summary

Content type

Image

Digest

sha256:4fbf4a78d

Size

298.5 MB

Last updated

about 3 years ago

docker pull janben/k8s-devops-tools:0.1