This is the Experimental version (Latest). It is under active development and may change. For the most reliable documentation, use the version selector in the top-right to switch to Stable, or click here to go to the Stable version's homepage.
Opstella Kubernetes Integration Installation
อัพเดทล่าสุด:
เนื้อหานี้ยังไม่มีในภาษาของคุณ
🟢 Management
Opstella Kubernetes Integration (ok8s-integration) is a Service for Opstella to perform Licensing System and Usages Collection.
Application Dependencies
Section titled “Application Dependencies”- 📦PostgreSQL-based Datastore ; Deploy external/dedicated instance of Database
Preparation
Section titled “Preparation”Kubernetes Cluster Preparation
Section titled “Kubernetes Cluster Preparation”-
Connect to
🟢 ManagementKubernetes Cluster ; i.e w/ Kubeconfig FileEnsure you have defined and loaded your Global Shell Variables as described in Shell Variables.
Terminal window source $BASE_WORKING_DIR/shell-values/kubernetes/management_cluster.vars.sh -
Prepare
🟢 ManagementKubernetes Cluster InformationEnsure
K8S_INTERNAL_DOMAIN,K8S_INGRESSCLASS_NAME,K8S_STORAGECLASS_NAMEare defined as per the Shell Variables guide.
Opstella Kubernetes Integration Datastore Preparation
Section titled “Opstella Kubernetes Integration Datastore Preparation”-
Create PostgreSQL Initial Admin Credentials with Kubernetes Secret
- Username:
postgres(Default Admin of PostgreSQL) - Password: (Loaded from opstella-platform.vars.sh)
- Username:
-
Provision PostgreSQL for Opstella Kubernetes Integration Datastore
The following manifest defines the entire PostgreSQL system using CloudNativePG, including credentials and the cluster.
Terminal window cat <<EOF > $BASE_WORKING_DIR/kubernetes-manifests/ok8s-integration-postgres.yaml---# Postgres Superuser (root) CredentialsapiVersion: v1kind: Secrettype: kubernetes.io/basic-authmetadata:name: ok8s-integration-postgres-superusernamespace: opstella-systemstringData:username: postgrespassword: "${OPSTELLA_CORE_LICENSE_POSTGRES_SUPERUSER_PASSWORD}"---# ok8s-integration Application User CredentialsapiVersion: v1kind: Secrettype: kubernetes.io/basic-authmetadata:name: ok8s-integration-postgres-usernamespace: opstella-systemstringData:username: ok8s_intergration_userpassword: "${OPSTELLA_CORE_LICENSE_POSTGRES_USER_PASSWORD}"---apiVersion: postgresql.cnpg.io/v1kind: Clustermetadata:name: ok8s-integration-postgresnamespace: opstella-systemlabels:app.kubernetes.io/name: ok8s-integration-postgresapp.kubernetes.io/part-of: opstella-platformspec:instances: 1# Image configuration (Postgres 15)imageName: ghcr.io/cloudnative-pg/postgresql:15# Storage Configurationstorage:size: 2GistorageClass: "${K8S_STORAGECLASS_NAME}"walStorage:size: 2GistorageClass: "${K8S_STORAGECLASS_NAME}"# Bootstrap Configurationbootstrap:initdb:database: ok8s_intergrationowner: ok8s_intergration_user# Secret containing password for the Application Usersecret:name: ok8s-integration-postgres-user# Superuser credentials (root/postgres)superuserSecret:name: ok8s-integration-postgres-superuser# Monitoring (disabled for now)monitoring:enablePodMonitor: false# Resourcesresources:requests:memory: "128Mi"cpu: "100m"limits:memory: "512Mi"cpu: "500m"EOFApply the configuration:
Terminal window kubectl apply -f $BASE_WORKING_DIR/kubernetes-manifests/ok8s-integration-postgres.yaml💡 Should return
secret/ok8s-integration-postgres-superuser,secret/ok8s-integration-postgres-user, andcluster.postgresql.cnpg.io/ok8s-integration-postgrescreated messages.
Opstella Kubernetes Integration Preparation
Section titled “Opstella Kubernetes Integration Preparation”-
Prepare Helm Values Configurations.
-
image.repository,image.tag: Set your Opstella Kubernetes Integration Container Image Location, Version(Ensure
OPSTELLA_REGISTRYis loaded from your variables)(Ensure
OPSTELLA_REGISTRYis loaded from your variables)(Ensure
OPSTELLA_OK8S_VERSIONis loaded from your variables) -
Datastore for Opstella Kubernetes Integration Information
(Ensure datastore parameters are loaded from your vars file)
-
Opstella Core Kubernetes Namespace
(Ensure namespace is loaded from your vars file)
-
-
Create Helm Values Configuration.
Terminal window cat <<EOF > $BASE_WORKING_DIR/helm-values/ok8s-integration-full-values.yamlimage:repository: ${OPSTELLA_CORE_LICENSE_IMAGE_REPOSITORY}tag: ${OPSTELLA_CORE_LICENSE_IMAGE_TAG}pullPolicy: AlwaysnameOverride: opstella-ok8sfullnameOverride: opstella-ok8sresources: {}imagePullSecrets:- registry-secretpodAnnotations:dapr.io/enabled: "true"dapr.io/app-id: "core-license"dapr.io/app-port: "3000"dapr.io/enable-api-logging: "true"dapr.io/config: "config"dapr.io/sidecar-seccomp-profile-type: "RuntimeDefault"containerPort: 3000vars:INVOKE_URL: http://localhost:3500/v1.0/invoke/opstella-core.opstella-system.svc/methodDB_HOST: "${OPSTELLA_CORE_LICENSE_POSTGRES_HOST}"DB_PORT: "${OPSTELLA_CORE_LICENSE_POSTGRES_PORT}"DB_NAME: "${OPSTELLA_CORE_LICENSE_POSTGRES_DB}"DB_USERNAME: "${OPSTELLA_CORE_LICENSE_POSTGRES_USER}"DB_PASSWORD: "${OPSTELLA_CORE_LICENSE_POSTGRES_USER_PASSWORD}"## ReadinessProbeprobe:enabled: truepath: "/"settings:initialDelaySeconds: 10periodSeconds: 60successThreshold: 1timeoutSeconds: 3failureThreshold: 3# Before you use a liveness probe: https://srcco.de/posts/kubernetes-liveness-probes-are-dangerous.htmllivenessProbe:enabled: truepath: "/healthcheck"settings:initialDelaySeconds: 30periodSeconds: 60successThreshold: 1timeoutSeconds: 3failureThreshold: 3volumes:- name: ok8s-integration-infoexistingSecret: ok8s-integration-infopath: /app/configpodSecurityContext:fsGroup: 1000securityContext:seccompProfile:type: RuntimeDefaultcapabilities:drop: ["ALL"]runAsNonRoot: trueprivileged: falseallowPrivilegeEscalation: falserunAsGroup: 1000runAsUser: 1000EOF
Install Dapr Components CRDs
Section titled “Install Dapr Components CRDs”-
Create Cron Bindings
Terminal window kubectl apply --namespace opstella-system -f - <<EOFapiVersion: dapr.io/v1alpha1kind: Componentspec:type: bindings.cronversion: v1metadata:- name: schedulevalue: "5 * * * *"- name: routevalue: "/api/collect-data"- name: methodvalue: POSTscopes:- core-licensemetadata:name: cronjob-collect-dataEOF
Installation
Section titled “Installation”-
Install Opstella Kubernetes Integration.
Install Helm Release using
onechartHelm Chart with specific Helm Chart Version--version 0.73.0Terminal window helm upgrade --install ok8s-integration \oci://ghcr.io/gimlet-io/onechart --version 0.73.0 \--namespace opstella-system \-f $BASE_WORKING_DIR/helm-values/ok8s-integration-full-values.yaml
Post-Installation
Section titled “Post-Installation”Opstella Kubernetes Integration Testing
Section titled “Opstella Kubernetes Integration Testing”-
Get Pod Status - Opstella Kubernetes Integration and its Datastore Service
Terminal window kubectl get pods -n opstella-system- Opstella Kubernetes Integration should be
Pending - Its Datastore Service should be
Running
NAME READY STATUS RESTARTS AGE... (deducted)ok8s-integration-XXXXXXX-YYYYY 0/1 Pending 0 1mok8s-integration-postgres-1 1/1 Running 0 1m - Opstella Kubernetes Integration should be
Finished?
Use the below navigation to proceed