如何更改数据
tar -zxf mychart-0.1.0.tgz
cd mychart
vi values.yaml
service:
type: NodePort
helm package .
helm install nginx mychart-0.1.0.tgz
helm list
helm uninstall nginx
将/root/mychart/mychart-0.1.0.tgz复制到本机
上传模板
安装模板
----------------------------
tar -zxf mariadb-7.3.14.tgz
cd mariadb
vi values.yaml
service:
## Kubernetes service type, ClusterIP and NodePort are supported at present
type: NodePort
nodePort:
master: 32334
rootUser:
## MariaDB admin password
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run
##
password: "chinaskill"
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
enabled: false
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
enabled: false
docker load -i bitnami_mariadb-10.3.22-debian-10-r27.tar
helm install mariadb .
-------------------------
kubectl create ns mariadb
mv mariadb mariadb10
tar -zxf mariadb-7.3.14.tgz
cd mariadb
vi values.yaml
service:
## Kubernetes service type, ClusterIP and NodePort are supported at present
type: NodePort
db:
## MariaDB username and password
## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run
##
user: "chinaskillroot"
password: "chinaskillpassword"
## Database to create
## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run
##
name: chinaskill
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
enabled: false
persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
enabled: false
helm install -n mariadb mariadb .
helm list -A
------------------------------------------
tar -zxf wordpress-13.0.23.tgz
cd wordpress
vi values.yaml
service:
## @param service.type WordPress service type
##
type: NodePort
readinessProbe:
enabled: false
readinessProbe:
enabled: false
查看persistence:配置
mariadb:
persistence:
enabled: false
docker load -i bitnami_wordpress-5.9.2-debian-10-r0.tar
docker load -i bitnami_mariadb-10.5.15-debian-10-r11.tar
mkdir /wp
chmod 777 /wp
vi pv.yaml
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-wp
labels:
name: pv-wp
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /wp
kubectl apply -f pv.yaml
helm install wordpress .
-----------------------------
mkdir -p /data/charts
chmod -R 777 /data/charts/
kubectl create ns chartmuseum
vi chartmuseum.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: chartmuseum
name: chartmuseum
namespace: chartmuseum
spec:
replicas: 1
selector:
matchLabels:
app: chartmuseum
template:
metadata:
labels:
app: chartmuseum
spec:
containers:
- image: chartmuseum/chartmuseum:latest
imagePullPolicy: IfNotPresent
name: chartmuseum
ports:
- containerPort: 8080
protocol: TCP
env:
- name: DEBUG
value: "1"
- name: STORAGE
value: local
- name: STORAGE_LOCAL_ROOTDIR
value: /charts
volumeMounts:
- mountPath: /charts
name: charts-volume
volumes:
- name: charts-volume
hostPath:
path: /data/charts
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: chartmuseum
namespace: chartmuseum
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: chartmuseum
kubectl apply -f chartmuseum.yaml
kubectl get svc -n chartmuseum
curl 10.106.178.78:8080
----------------------
helm repo add chartmuseum http://10.106.178.78:8080
[root@master ~]# helm repo list
NAME URL
chartmuseum http://10.106.178.78:8080
[root@master ~]# curl --data-binary "@wordpress-13.0.23.tgz" http://10.106.178.78:8080/api/charts
{"saved":true}
[root@master ~]# curl http://10.106.178.78:8080/api/charts
{"wordpress":[{"name":"wordpress","home":"https://github.com/bitnami/charts/tree/master/bitnami/wordpress","sources":["https://github.com/bitnami/bitnami-docker-wordpress","https://wordpress.org/"],"version":"13.0.23","description":"WordPress is the world's most popular blogging and content management platform. Powerful yet simple, everyone from students to global corporations use it to build beautiful, functional websites.","keywords":["application","blog","cms","http","php","web","wordpress"],"maintainers":[{"name":"Bitnami","email":"containers@bitnami.com"}],"icon":"https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png","apiVersion":"v2","appVersion":"5.9.2","annotations":{"category":"CMS"},"dependencies":[{"name":"memcached","version":"6.x.x","repository":"https://charts.bitnami.com/bitnami","condition":"memcached.enabled"},{"name":"mariadb","version":"10.x.x","repository":"https://charts.bitnami.com/bitnami","condition":"mariadb.enabled"},{"name":"common","version":"1.x.x","repository":"https://charts.bitnami.com/bitnami","tags":["bitnami-common"]}],"urls":["charts/wordpress-13.0.23.tgz"],"created":"2022-09-11T10:00:20.391057325Z","digest":"a4b42912909775eec74ec0cab4c021692bbf8234ead837f2cae3824f0762b228"}]}
helm repo update
helm install wordpress chartmuseum/wordpress
-------------------
yum groupinstall 'Development Tools'
yum install glibc-static
tar -zxf chkrootkit.tar.gz
cd chkrootkit
make sense
./chkrootkit
----------------------
https://elk-docker.readthedocs.io/
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sysctl -p
docker load -i sebp_elk-7.16.3.tar
docker run -d --name elk --restart always -p 5601:5601 -p 9200:9200 -p 5044:5044 -e TZ=Asia/Shanghai sebp/elk:7.16.3
docker exec -it elk bash
/opt/logstash/bin/logstash --path.data /tmp/logstash/data -e 'input { stdin { } } output { elasticsearch { hosts => ["localhost"] } }'
this is a dummy entry
Ctrl+C
http://192.168.100.79:9200/_search?pretty&size=1000
http://192.168.100.79:5601
rpm -ivh filebeat-7.16.3-x86_64.rpm
mv /etc/filebeat/filebeat.yml /etc/filebeat/filebeat.yml.bak
rm -f /etc/filebeat/filebeat.yml
vi /etc/filebeat/filebeat.yml
output:
logstash:
enabled: true
hosts:
- 192.168.100.79:5044
timeout: 15
ssl:
certificate_authorities:
- /etc/pki/tls/certs/logstash-beats.crt
filebeat:
inputs:
-
paths:
- /var/log/messages
document_type: syslog
vi /etc/pki/tls/certs/logstash-beats.crt
-----BEGIN CERTIFICATE-----
MIIC6zCCAdOgAwIBAgIJANPZwuf+5wTLMA0GCSqGSIb3DQEBCwUAMAwxCjAIBgNV
BAMMASowHhcNMTUxMjI4MTA0NTMyWhcNMjUxMjI1MTA0NTMyWjAMMQowCAYDVQQD
DAEqMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp+jHFvhyYKiPXc7k
0c33f2QV+1hHNyW/uwcJbp5jG82cuQ41v70Z1+b2veBW4sUlDY3yAIEOPSUD8ASt
9m72CAo4xlwYKDvm/Sa3KJtDk0NrQiz6PPyBUFsY+Bj3xn6Nz1RW5YaP+Q1Hjnks
PEyQu4vLgfTSGYBHLD4gvs8wDWY7aaKf8DfuP7Ov74Qlj2GOxnmiDEF4tirlko0r
qQcvBgujCqA7rNoG+QDmkn3VrxtX8mKF72bxQ7USCyoxD4cWV2mU2HD2Maed3KHj
KAvDAzSyBMjI+qi9IlPN5MR7rVqUV0VlSKXBVPct6NG7x4WRwnoKjTXnr3CRADD0
4uvbQQIDAQABo1AwTjAdBgNVHQ4EFgQUVFurgDwdcgnCYxszc0dWMWhB3DswHwYD
VR0jBBgwFoAUVFurgDwdcgnCYxszc0dWMWhB3DswDAYDVR0TBAUwAwEB/zANBgkq
hkiG9w0BAQsFAAOCAQEAaLSytepMb5LXzOPr9OiuZjTk21a2C84k96f4uqGqKV/s
okTTKD0NdeY/IUIINMq4/ERiqn6YDgPgHIYvQheWqnJ8ir69ODcYCpsMXIPau1ow
T8c108BEHqBMEjkOQ5LrEjyvLa/29qJ5JsSSiULHvS917nVgY6xhcnRZ0AhuJkiI
ARKXwpO5tqJi6BtgzX/3VDSOgVZbvX1uX51Fe9gWwPDgipnYaE/t9TGzJEhKwSah
kNr+7RM+Glsv9rx1KcWcx4xxY3basG3/KwvsGAFPvk5tXbZ780VuNFTTZw7q3p8O
Gk1zQUBOie0naS0afype5qFMPp586SF/2xAeb68gLg==
-----END CERTIFICATE-----
systemctl start filebeat
------------------------------------------------------
- 点赞
- 收藏
- 关注作者
评论(0)