k8s 部署 phpldapadmin 问题: 解决: --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: phpldapadmin-deploy-dev spec: replicas: 1 template: metadata: labels: app: phpldapadmin-dev spec: containers: - name: phpldapadmin-dev image: osixia/phpldapadmin:0.7.1 ports: - containerPort: 80 env: - name: PHPLDAPADMIN_LDAP_HOSTS value: "172.18.255.209" # - # name: PHPLDAPADMIN_LDAP_PORT # value: "389" - name: PHPLDAPADMIN_HTTPS value: "false" #docker run -p 3333:80 -e PHPLDAPADMIN_LDAP_HOSTS=10.17.2.54 -e PHPLDAPADMIN_HTTPS=false -d osixia/phpldapadmin:0.7.1 --- apiVersion: v1 kind: Service metadata: name: phpldapadmin-service-dev spec: type: LoadBalancer selector: app: phpldapadmin-dev ports: - name: http protocol: TCP port: 80 targetPort: 80 123456789101112131415161718192021222324252627282930313233343536373839404142434445 ---apiVersion: extensions/v1beta1kind: Deploymentmetadata: name: phpldapadmin-deploy-devspec: replicas: 1 template: metadata: labels: app: phpldapadmin-dev spec: containers: - name: phpldapadmin-dev image: osixia/phpldapadmin:0.7.1 ports: - containerPort: 80 env: - name: PHPLDAPADMIN_LDAP_HOSTS value: "172.18.255.209" # - # name: PHPLDAPADMIN_LDAP_PORT # value: "389" - name: PHPLDAPADMIN_HTTPS value: "false"#docker run -p 3333:80 -e PHPLDAPADMIN_LDAP_HOSTS=10.17.2.54 -e PHPLDAPADMIN_HTTPS=false -d osixia/phpldapadmin:0.7.1 ---apiVersion: v1kind: Servicemetadata: name: phpldapadmin-service-devspec: type: LoadBalancer selector: app: phpldapadmin-dev ports: - name: http protocol: TCP port: 80 targetPort: 80 … Read More
k8s 部署 openldap 问题: 解决: --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: openldap-config-pvc-dev spec: storageClassName: cbs accessModes: - ReadWriteOnce resources: requests: storage: 1Gi --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: openldap-data-pvc-dev spec: storageClassName: cbs accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: openldap-deploy-dev labels: app: openldap-dev spec: replicas: 1 template: metadata: labels: app: openldap-dev spec: containers: - name: openldap-dev image: osixia/openldap:1.2.1 volumeMounts: - name: ldap-data mountPath: /var/lib/ldap - name: ldap-config mountPath: /etc/ldap/slapd.d ports: - containerPort: 389 name: openldap env: - name: LDAP_LOG_LEVEL value: "256" - name: LDAP_ORGANISATION value: "test" - name: LDAP_DOMAIN value: "test.cn" - name: LDAP_ADMIN_PASSWORD value: "123456" - name: LDAP_CONFIG_PASSWORD value: "123456" - name: LDAP_TLS value: "false" volumes: - name: ldap-data persistentVolumeClaim: claimName: openldap-data-pvc-dev - name: ldap-config persistentVolumeClaim: claimName: openldap-config-pvc-dev --- apiVersion: v1 kind: Service metadata: labels: app: openldap-dev name: openldap-service-dev spec: type: NodePort ports: - port: 389 nodePort: 30389 selector: app: openldap-dev 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 ---apiVersion: v1kind: PersistentVolumeClaimmetadata: name: openldap-config-pvc-devspec: storageClassName: cbs accessModes: - ReadWriteOnce resources: requests: storage: 1Gi ---apiVersion: v1kind: PersistentVolumeClaimmetadata: name: openldap-data-pvc-devspec: storageClassName: cbs accessModes: - ReadWriteOnce resources: requests: storage: 10Gi---apiVersion: extensions/v1beta1kind: Deploymentmetadata: name: openldap-deploy-dev labels: app: openldap-devspec: replicas: 1 template: metadata: labels: app: openldap-dev spec: containers: - name: openldap-dev image: osixia/openldap:1.2.1 volumeMounts: - name: ldap-data mountPath: /var/lib/ldap - name: ldap-config mountPath: /etc/ldap/slapd.d ports: - containerPort: 389 name: openldap env: - name: LDAP_LOG_LEVEL value: "256" - name: LDAP_ORGANISATION value: "test" - name: LDAP_DOMAIN value: "test.cn" - name: LDAP_ADMIN_PASSWORD value: "123456" - name: LDAP_CONFIG_PASSWORD value: "123456" - name: LDAP_TLS value: "false" volumes: - name: ldap-data persistentVolumeClaim: claimName: openldap-data-pvc-dev - name: ldap-config persistentVolumeClaim: claimName: openldap-config-pvc-dev ---apiVersion: v1kind: Servicemetadata: labels: app: openldap-dev name: openldap-service-devspec: type: NodePort ports: - port: 389 nodePort: 30389 selector: app: openldap-dev … Read More