GitLab Installation and Configuration
Download the rpm
Installation
rpm -i gitlab-ce-17.3.7-ce.0.el8.aarch64.rpm
November 14, 2024Less than 1 minute
rpm -i gitlab-ce-17.3.7-ce.0.el8.aarch64.rpm
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
kubectl apply -f recommend.yaml
kubectl get all -n kubernetes-dashboard -o wide
https://ip:port
# Create account configuration
touch dashboard-admin.yaml
Info
In Linux, use "crontab -e" to write some expression
apiVersion: batch/v1
kind: CronJob
metadata:
name: hello
spec:
concurrencyPolicy: Allow # 并发调度策略:Allow 允许并发调度,Forbid:不允许并发执行,Replace:如果之前的任务还没执行完,就直接执行新的,放弃上一个任务
failedJobsHistoryLimit: 1 # 保留多少个失败的任务
successfulJobsHistoryLimit: 3 # 保留多少个成功的任务
suspend: false # 是否挂起任务,若为 true 则该任务不会执行
# startingDeadlineSeconds: 30 # 间隔多长时间检测失败的任务并重新执行,时间不能小于 10
schedule: "* * * * *" # 调度策略
jobTemplate:
spec:
template:
spec:
containers:
- name: hello
image: busybox:1.28
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
Helm is a package manager for Kubernetes, designed to simplify the deployment and management of applications on Kubernetes clusters. Helm allows developers to package, configure, and deploy applications as reusable "charts," which are collections of YAML files that describe a related set of Kubernetes resources.
cd kube-prometheus
kubectl create -f manifests/setup/
kubectl create -f manifests/
kubectl get all -n monitoring
kubectl get svc -n monitoring
kubectl create cm -h # Check the configuration information
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
labels:
app: nginx-svc
spec:
ports:
- name: http # Name of the service port configuration
protocol: TCP # Protocol used for port binding, supports TCP, UDP, SCTP; defaults to TCP
port: 80 # The service's port
targetPort: 9527 # The target pod's port
- name: https
port: 443
protocol: TCP
targetPort: 443
selector: # Select which pods the current service will match and proxy traffic to
app: nginx
kubectl get po --show-labels
NAME READY STATUS RESTARTS AGE LABELS
nginx-demo 1/1 Running 0 23h type=app,version=1.0.0