Oracle Database Operator in Oracle Kubernetes Engine – Installation

Kubernetes was never originally designed with stateful workloads in mind. However, its popularity in this area has led many companies to take a closer look at the possibility of maintaining a single stack, rather than managing two separate ones—one for applications and another for data. The community has become deeply involved, leading to the creation of the Data on Kubernetes Community (https://dok.community/). While there are many ways to build databases on Kubernetes, the key challenges that need to be addressed are:

  • How will we support “day-two” operations? If our environment isn’t large, this might not be a major issue. But in even a slightly larger environment, the workload would be truly herculean. Automation? Yes.
  • Is the scalability mechanism built into the engine in a straightforward way? Most relational databases lack a simple procedure for building in scalability, whereas this is often standard for NoSQL databases. Think of MySQL vs. Apache Cassandra.
  • Complexity, standardization, and configuration—a few YAML files suffice for simple setups, but for more complex ones, we look to Helm Charts. We also value having our environment meet certain standards, especially when working for large organizations.
  • Automation – Helm is more of a package manager than a fully automated solution. It has its own limitations, which are quite problematic for CI/CD pipelines (such as the GitLab setup I use) and IaC solutions (like Terraform).

One concept in Kubernetes that can help address these issues is the Operator pattern. Kubernetes features a highly extensible API, which can be expanded using Custom Resource Definitions (CRDs). An Operator is a type of controller; the difference is that an Operator manages domain-specific components, whereas a standard controller handles core Kubernetes entities—such as a Deployment. A standard controller is a simple tool that implements a control loop consisting of four steps:

  • Reading the current state of resources
  • Making changes to the state of resources
  • Updating the status of resources
  • Repeat

An operator automates operations performed on a CRD; for example, when scaling up the number of instances, the operator is aware of the engine’s specifics and handles the automation itself. Many operators exist today, and there is even a dedicated repository that aggregates them all: OperatorHub. Another noteworthy feature is a specific metric that describes the extent to which a given operator is cloud-native: the Capability Level. There are five levels, ranging from “Basic” to “Auto-pilot.” Since this post focuses on the Oracle Database Operator, let’s take a look at its Capability Level.

In other words, it ensures:

  • Installation and configuration of Kubernetes and workloads
  • Upgrade of the managed workload and operator

However, the lack of full lifecycle support means it is not production-ready.

Let’s look at how to install it on Oracle Kubernetes Engine in OCI. The Enhanced version is required to install additional add-ons. Even if you create a Basic version cluster, certain add-ons are installed by default; however, without the Enhanced version, you cannot manage them. Furthermore, you cannot perform an online migration from Basic to Enhanced. Even if you don’t need extra features right now, keep this in mind when creating the cluster.

This is the set of default add-ons pre-installed in OKE.

For Oracle Database operator we have one prerequisite – we have to install cert-manager. Operator uses webooks for validating user input before persists in etcd. Even if you install the operator using automation in OCI, it’s still the same
You need to install cert-manager yourself first.

We can specify a configuration when installing add-ons in OKE. To start, I checked what the default options were.

Checking PODs for this operator.

It’s a bit odd—there’s only one by default. I like HA, so I changed this setting to 3 pods.

It looks better now.

There are two other installation options:

Mixing different types of installations is not recommended. I tried to troubleshoot issues I encountered along the way using that approach; ultimately, I just created a bigger mess and had to start over. I haven’t tested how OKE behaves on Virtual Nodes, but I wouldn’t recommend it, as Virtual Nodes do not support initContainers—and most applications utilizing the Oracle Database operator rely on them by default. With the operator installed, we can attempt to create databases from the Oracle portfolio. We will cover that in the next post.

Gitlab – Oracle Deployment Pipeline (I)

Let me demonstrate one of functionality provided by our automation – using the example of installing the Oracle database (IaaS mode).The new database is delivered in one of four types – Sandpit, Development, Test and Production.
The user himself determines the characteristics of the database in the web tool. Finally, the database is also connected to various internal company systems.

What is provided in this automated pipeline?

  • ServiceNow CMDB updated with new Configuration Item and all upstream and downstream relations
  • Validation of input parameters (static & dynamic)
  • Backup automatically added for database (Cohesity/NAS) with proper retentions
  • ITIL procedures automatically handled (Change Requests + Incidents)
  • Email communication for deployment
  • Automatic test cases performed during deployment
  • Triggered by Automation Form or curl command (CLI mode)
  • Integration with Mercury API for cli mode

One of the pipeline parameters is the type of action we want to perform.
It can be: prepare, installsw, full, createdb.
In prepare, the server is prepared for database installation and the state it expects
automation. This can also be used to check whether the server is in the state expected by the automation.
The next installsw is to install the Oracle database software on the server.
Createdb – here we create a database and prepare it to work in the environment.

Here I have a diagram of this pipeline. Each of them is a stage that has a specific job defined.
For descriptive purposes, I have assigned each of these stags to one of four categories (technical steps, tests/validation/communication/
ServiceNow operation related to ITIL).

As we see simple pipeline could have multiple tasks. In next post we tour the most important part of pipeline code.

GitOps Configuration Management with Kustomize

In the early days of GitOps, configuration management often boiled down to maintaining separate configurations for each environment in separate folders. The configuration—in the form of YAML manifests—simply had to be applied using kubectl apply -f <directory>
This approach worked well enough when environments were small and relatively static. However, as environments scaled and changes became more frequent, the resulting redundancy and error-proneness made it clear that it was time to invest effort in a dedicated configuration management tool. There are three most popular tools in the GitOps world:

  • Helm
  • Kustomize
  • Jsonnet (also used in Tanka as an alternative declarative way to deploy applications. If you are interested in the topic, you can find the entry on my blog)

Some might be surprised to see Helm listed here, given that it is a package manager within the Kubernetes ecosystem. However, since Helm relies on Go templates, it also functions as a configuration management tool. Combined with a vast repository of charts (Kubernetes installation packages), it stands as the most popular configuration management tool for Kubernetes—chances are, a chart already exists to solve whatever problem you might have. Unfortunately, templating with Helm is not easy, and the readability leaves much to be desired; its greatest strength, however, is its flexibility.
In this post, we will take a look at Kustomize—a tool that may be less popular but still has its advantages.
Let’s start by examining the basic structure where Kustomize is used.

	[oracle@AP1220431170472 kustomize]$ ls -l *
	common:
	total 8
	-rw-rw-r-- 1 oracle oracle 428 Jun 25 12:35 deployment.yaml
	-rw-rw-r-- 1 oracle oracle  94 Jun 25 12:15 kustomization.yaml
	
	envs:
	total 8
	drwxrwxr-x 2 oracle oracle 4096 Jun 25 12:38 production
    drwxrwxr-x 2 oracle oracle 4096 Jun 25 12:38 qualityassurance

We need to define which files are managed by Kustomize. This is defined in the `kustomization.yaml` file.

	[oracle@AP1220431170472 common]$ cat kustomization.yaml
	apiVersion: kustomize.config.k8s.io/v1beta1
	kind: Kustomization
	
	resources:
    - deployment.yaml

Important! The management component covers only the basic objects. The configurations we will apply to the environments are not included in this. Here, we have a single deployment.

apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-app
spec:
replicas: CHANGEME
revisionHistoryLimit: 3
selector:
matchLabels:
app: sample-app
template:
metadata:
labels:
app: sample-app
spec:
containers:
- command:
- /app/sample-app
image: gitops/sample-app:CHANGEME
name: sample-app
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: sample-service
spec:
selector:
app: sample-app
ports:
- protocol: TCP
port: CHANGEME
targetPort: CHANGEME
type: ClusterIP

A managed Deployment in Kustomize is like an abstract class in programming; we do not want it to be deployable or instantiable as-is. To achieve this, we mark the specific areas that environment-specific configuration should override. There is no strict naming convention—anything useful works. I chose `CHANGEME` to ensure the configuration supplies the specific image and replica count.
Okay. Let’s move on to deploying the application to the first environment—Quality Assurance.
The first file is a kustomize.yaml file, similar to the one defined for the database.

	apiVersion: kustomize.config.k8s.io/v1beta1
	kind: Kustomization
	
	images:
	- name: gitopsbook/sample-app
	  newTag: v0.2
	
	resources:
	- ../../common
	
	patches:
	  - target:
	      kind: Service
	      name: sample-service
	    patch: |-
	      - op: replace
	        path: /spec/ports/0/port
	        value: 8080
	      - op: replace
	        path: /spec/ports/0/targetPort
	        value: 8080
	
	  - target:
	      kind: Deployment
	      name: sample-app
	    patch: |-
	      - op: replace
	        path: /spec/replicas
	        value: 1
	
	  - path: debug.yaml

We define the image to be used in the deployment (an override) and specify that the base deployment is located in the `common` folder. The `patches` section specifies modifications to the deployment.
The next environment file is `debug.yaml`, where we add the `DEBUG` environment variable to our deployment.

	[oracle@AP1220431170472 qualityassurance]$ cat debug.yaml
	apiVersion: apps/v1
	kind: Deployment
	metadata:
	  name: sample-app
	spec:
	  replicas: 1
	  template:
	    spec:
	      containers:
	      - name: sample-app
	        env:
	        - name: DEBUG
	          value: "true"

To generate the resulting deployment file, run the kustomize build command.

[oracle@AP1220431170472 kustomize]$ kustomize build envs/qualityassurance
apiVersion: v1
kind: Service
metadata:
name: sample-service
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: sample-app
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-app
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app: sample-app
template:
metadata:
labels:
app: sample-app
spec:
containers:
- command:
- /app/sample-app
env:
- name: DEBUG
value: "true"
image: gitopsbook/sample-app:v0.2
name: sample-app
ports:
- containerPort: 8080

As you can see, we have correctly entered the number of pods and the image specification.
Deploying the application is now essentially a formality.

[oracle@AP1220431170472 kustomize]$ kubectl create namespace qualityassurance
namespace/qualityassurance created
[oracle@AP1220431170472 kustomize]$ kustomize build envs/qualityassurance | kubectl apply -n qualityassurance -f -
service/sample-service created
deployment.apps/sample-app created

Our application looks good.

Kustomize is declarative, readable, and very easy to maintain. Unfortunately, it lacks the flexibility of Helm, where templates serve as a highly powerful mechanism. It also lacks an equivalent to the Chart Repository. Nevertheless, it is worth keeping in your toolkit for situations where a problem cannot be easily solved using Helm.

GitOps with JenkinsX – Installation

Jenkins X is another GitOps operator that can be used on an OKE cluster. It can be installed in two ways:

  • Installation of Jenkins X on an existing OKE cluster
  • Creation of a new OKE cluster with JenkinsX installed
		tziss85@cloudshell:~ (eu-frankfurt-1)$ kubectl cluster-info
		Kubernetes control plane is running at https://89.168.98.210:6443
		CoreDNS is running at https://89.168.98.210:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
		
		To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.


Installing the tools required for Jenkins X.

		tziss85@cloudshell:~ (eu-frankfurt-1)$ curl -L https://github.com/jenkins-x/jx/releases/download/v3.17.29/jx-linux-amd64.tar.gz | tar xzv
		  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
		                                 Dload  Upload   Total   Spent    Left  Speed
		  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
		LICENSE
		README.md
		jx
		100 30.5M  100 30.5M    0     0  23.1M      0  0:00:01  0:00:01 --:--:-- 27.7M
		tziss85@cloudshell:~ (eu-frankfurt-1)$ ./jx version
		version: 3.17.29
		shaCommit: 9f00c9bf55b4571c7e3e636d491dd83eda885df7
		buildDate: Tue Jun 30 19:29:30 UTC 2026
		goVersion: 1.26.3
		branch: main
		gitTreeState: clean


Installing the Helm tool.

	tziss85@cloudshell:~ (eu-frankfurt-1)$ wget https://get.helm.sh/helm-v3.21.2-linux-amd64.tar.gz
	--2026-07-02 06:08:17--  https://get.helm.sh/helm-v3.21.2-linux-amd64.tar.gz
	Resolving get.helm.sh (get.helm.sh)... 150.171.110.52, 2603:1061:14:134::1
	Connecting to get.helm.sh (get.helm.sh)|150.171.110.52|:443... connected.
	HTTP request sent, awaiting response... 200 OK
	Length: 17824916 (17M) [application/x-tar]
	Saving to: ‘helm-v3.21.2-linux-amd64.tar.gz’
	
	helm-v3.21.2-linux-amd64.tar.gz                                    100%[================================================================================================================================================================>]  17.00M  58.9MB/s    in 0.3s    
	
	2026-07-02 06:08:18 (58.9 MB/s) - ‘helm-v3.21.2-linux-amd64.tar.gz’ saved [17824916/17824916]
	
	tziss85@cloudshell:~ (eu-frankfurt-1)$ tar -xvf helm-v3.21.2-linux-amd64.tar.gz 
	linux-amd64/
	linux-amd64/README.md
	linux-amd64/LICENSE
	linux-amd64/helm

	tziss85@cloudshell:~ (eu-frankfurt-1)$ ./helm version
	version.BuildInfo{Version:"v3.21.2", GitCommit:"125963406833fe0525be91f46c8b5b0f22fb9e32", GitTreeState:"clean", GoVersion:"go1.26.4"}


Let’s install git operator for JenkinsX.

tziss85@cloudshell:jx3 (eu-frankfurt-1)$ ../jx admin operator
git clone URL is https://github.com/zizu1985/jx3
now verifying we have a valid git username and token so that we can clone the git repository inside kubernetes...
To work with git provider https://github.com we need an API Token
Please click this URL and generate a token
https://github.com/settings/tokens/new?scopes=repo,read:user,read:org,user:email,admin:repo_hook,delete_repo,write:packages,read:packages,write:discussion,workflow
Then COPY the token and enter it below:
? Enter Bot Git token the Kubernetes operator will use to clone the environment git repository [? for help] ****************************************
git username is zizu1985 for URL https://github.com/zizu1985/jx3 and we have a valid password
running command:
/home/tziss85/.jx3/plugins/bin/helm-3.6.2 upgrade --install \
--set url=https://github.com/zizu1985/jx3 \
--set username=zizu1985 \
--set password=**** --namespace jx-git-operator --create-namespace jxgo jxgh/jx-git-operator
tziss85@cloudshell:~ (eu-frankfurt-1)$ kubectl get svc -n nginx ingress-nginx-controller
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer 10.96.66.151 92.5.162.207 80:30966/TCP,443:31590/TCP 33m

And check external-ip for NGINX ingress operator

tziss85@cloudshell:~ (eu-frankfurt-1)$ kubectl get svc -n nginx ingress-nginx-controller
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer 10.96.66.151 92.5.162.207 80:30966/TCP,443:31590/TCP 33m

Remember to update hosts file.

92.5.162.207 dashboard-jx.change.me
92.5.162.207 hook-jx.change.me
92.5.162.207 bucketrepo-jx.change.me

Finally we have as below.

Initially I’ve tried OKE cluster with virtual nodes. Unfortunately this type of OKE cluster doesn’t support ingress controller, so you cannot install JenkinsX there. You have to used Managed Worker Nodes. No serverless experience this time …..

GitOps with Flux

Flux is one of the GitOps operators offering GitOps-driven continuous deployment in Kubernetes. Flux deserves pride of place, as its creator—Weaveworks—invented GitOps and played a pivotal role in its further development. In this post, we will look at installing Flux on our Kubernetes cluster.
Unlike ArgoCD, Flux lacks built-in features required for enterprise environments.
This makes it more flexible, yet also means it is rarely found in large-scale environments.
The installation consists of two parts. ArgoCD offers “GitOps as a service,” whereas Flux gives DevOps teams greater freedom.
In the first part, we install the CLI client, and in the second, the daemon that runs within the cluster.

[root@AP1220431170472 ~]# curl -s https://fluxcd.io/install.sh | sudo bash
[INFO] Downloading metadata https://api.github.com/repos/fluxcd/flux2/releases/latest
[INFO] Using 2.9.0 as release
[INFO] Downloading hash https://github.com/fluxcd/flux2/releases/download/v2.9.0/flux_2.9.0_checksums.txt
[INFO] Downloading binary https://github.com/fluxcd/flux2/releases/download/v2.9.0/flux_2.9.0_linux_amd64.tar.gz
[INFO] Verifying binary download
which: no shasum in (/sbin:/bin:/usr/sbin:/usr/bin)
[INFO] Installing flux to /usr/local/bin/flux
[root@AP1220431170472 ~]# su - oracle
Last login: Wed Jul 1 07:44:59 CEST 2026 on pts/0
[oracle@AP1220431170472 ~]$ flux version
✗ no deployments found in flux-system namespace
[oracle@AP1220431170472 ~]$ which flux
/usr/local/bin/flux
[oracle@AP1220431170472 ~]$ flux --version
flux version 2.9.0
[oracle@AP1220431170472 ~]$ flux | head -n 10
Command line utility for assembling Kubernetes CD pipelines the GitOps way.
Usage:
flux [command]
Examples:
# Check prerequisites
flux check --pre

It is interesting that Flux provides autocompletion for the `flux` command.
To enable this, we update our Bash profiles after installing `bash-completion`.

[root@AP1220431170472 ~]# yum install bash-completion
Oracle Linux 8 BaseOS Latest (x86_64) 44 kB/s | 4.3 kB 00:00
Oracle Linux 8 BaseOS Latest (x86_64) 26 MB/s | 148 MB 00:05
Oracle Linux 8 Application Stream (x86_64) 46 kB/s | 4.5 kB 00:00
Oracle Linux 8 Application Stream (x86_64) 18 MB/s | 82 MB 00:04
Last metadata expiration check: 0:00:37 ago on Wed Jul 1 07:54:16 2026.
Dependencies resolved.
=====================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================
Installing:
bash-completion noarch 1:2.7-5.el8 ol8_baseos_latest 274 k
Transaction Summary
=====================================================================================================================================
Install 1 Package
Total download size: 274 k
Installed size: 895 k
Downloading Packages:
bash-completion-2.7-5.el8.noarch.rpm 1.6 MB/s | 274 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------
Total 1.5 MB/s | 274 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : bash-completion-1:2.7-5.el8.noarch 1/1
Verifying : bash-completion-1:2.7-5.el8.noarch 1/1
Installed:
bash-completion-1:2.7-5.el8.noarch
Complete!
[root@AP1220431170472 ~]# su - oracle
Last login: Wed Jul 1 07:48:14 CEST 2026 on pts/0
[oracle@AP1220431170472 ~]$ flux
bootstrap completion delete events help logs pull resume tag trigger
build create diff export install migrate push stats trace uninstall
check debug envsubst get list plugin reconcile suspend tree version

Now let’s try to install application.

[oracle@AP1220431170472 ~]$ export GITHUB_TOKEN=<YOUR_GITHUB_TOKEN>
[oracle@AP1220431170472 ~]$ flux install --namespace=flux
✚ generating manifests
✔ manifests build completed
► installing components in flux namespace
CustomResourceDefinition/alerts.notification.toolkit.fluxcd.io created
CustomResourceDefinition/buckets.source.toolkit.fluxcd.io created
CustomResourceDefinition/externalartifacts.source.toolkit.fluxcd.io created
CustomResourceDefinition/gitrepositories.source.toolkit.fluxcd.io created
CustomResourceDefinition/helmcharts.source.toolkit.fluxcd.io created
CustomResourceDefinition/helmreleases.helm.toolkit.fluxcd.io created
CustomResourceDefinition/helmrepositories.source.toolkit.fluxcd.io created
CustomResourceDefinition/kustomizations.kustomize.toolkit.fluxcd.io created
CustomResourceDefinition/ocirepositories.source.toolkit.fluxcd.io created
CustomResourceDefinition/providers.notification.toolkit.fluxcd.io created
CustomResourceDefinition/receivers.notification.toolkit.fluxcd.io created
Namespace/flux created
ClusterRole/crd-controller-flux created
ClusterRole/flux-edit-flux created
ClusterRole/flux-view-flux created
ClusterRoleBinding/cluster-reconciler-flux created
ClusterRoleBinding/crd-controller-flux created
ResourceQuota/flux/critical-pods-flux created
ServiceAccount/flux/helm-controller created
ServiceAccount/flux/kustomize-controller created
ServiceAccount/flux/notification-controller created
ServiceAccount/flux/source-controller created
Service/flux/notification-controller created
Service/flux/source-controller created
Service/flux/webhook-receiver created
Deployment/flux/helm-controller created
Deployment/flux/kustomize-controller created
Deployment/flux/notification-controller created
Deployment/flux/source-controller created
NetworkPolicy/flux/allow-egress created
NetworkPolicy/flux/allow-scraping created
NetworkPolicy/flux/allow-webhooks created
◎ verifying installation
✔ helm-controller: deployment ready
✔ kustomize-controller: deployment ready
✔ notification-controller: deployment ready
✔ source-controller: deployment ready
✔ install finished

You have to remember to specify namespace in deployment. Flux will not overwrite application if you have it already deployed.
It detects this application deployment is not managed by Flux and ignore operations there.

[oracle@AP1220431170472 sample-app-deployment]$ flux create source git my-app \
> --url=https://github.com/zizu1985/sample-app-deployment.git \
> --branch=master \
> -n flux
✚ generating GitRepository source
► applying GitRepository source
✔ GitRepository source created
◎ waiting for GitRepository source reconciliation
✔ GitRepository source reconciliation completed
✔ fetched revision: master@sha1:234b488eddd3f039faa2181a6d2f9c18209c4149

Flux supports multiple configuration management tools. In our case we going to use Kustomize. Let’s define this in Flux

flux create kustomization my-app \
--source=my-app \
--path="." \
--prune=true \
--interval=5m \
-n flux
✚ generating Kustomization
► applying Kustomization
✔ Kustomization updated
◎ waiting for Kustomization reconciliation
✗ the server could not find the requested resource (get kustomizations.kustomize.toolkit.fluxcd.io sample-app)

We have to wait for deployment and finally we have in logs.

[oracle@AP1220431170472 sample-app-deployment]$ flux get kustomizations -n flux
NAME REVISION SUSPENDED READY MESSAGE
my-app master@sha1:25625d8a False True Applied revision: master@sha1:25625d8a
[oracle@AP1220431170472 sample-app-deployment]$ kubectl logs deployment/kustomize-controller -n flux
……..
……..
{"level":"info","ts":"2026-07-01T07:39:57.771Z","msg":"server-side apply completed","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"my-app","namespace":"flux"},"namespace":"flux","name":"my-app","reconcileID":"46a7c73e-d3f6-46fd-8547-c6b074268a99","output":{"Deployment/sample-app-flux/sample-app":"created","Service/sample-app-flux/sample-app":"created"},"revision":"master@sha1:25625d8a24855b90124b0806609bb6eb4a27b50b"}
{"level":"info","ts":"2026-07-01T07:39:57.788Z","msg":"Reconciliation finished in 77.31901ms, next run in 5m0s","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"my-app","namespace":"flux"},"namespace":"flux","name":"my-app","reconcileID":"46a7c73e-d3f6-46fd-8547-c6b074268a99","revision":"master@sha1:25625d8a24855b90124b0806609bb6eb4a27b50b"}

Application is looking nice. Let’s try changing the application and see what happens.

[oracle@AP1220431170472 sample-app-deployment]$ git diff
diff --git a/deployment.yaml b/deployment.yaml
index 2b8c351..5c27dea 100644
--- a/deployment.yaml
+++ b/deployment.yaml
@@ -17,7 +17,7 @@ spec:
containers:
- command:
- /app/sample-app
- image: gitopsbook/sample-app:v0.1
+ image: gitopsbook/sample-app:v0.2
name: sample-app
ports:
- containerPort: 8080
[oracle@AP1220431170472 sample-app-deployment]$ git add .
[oracle@AP1220431170472 sample-app-deployment]$ git commit - "Version 0.2 added"
error: pathspec '-' did not match any file(s) known to git
error: pathspec 'Version 0.2 added' did not match any file(s) known to git
[oracle@AP1220431170472 sample-app-deployment]$ git commit -m "Version 0.2 added"
[master 3d0c7b5] Version 0.2 added
1 file changed, 1 insertion(+), 1 deletion(-)
[oracle@AP1220431170472 sample-app-deployment]$ git push
Username for 'https://github.com': zizu1985
Password for 'https://zizu1985@github.com':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 14 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 291 bytes | 291.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/zizu1985/sample-app-deployment.git
25625d8..3d0c7b5 master -> master

In next reconilatio run our application has been automatically updated.

{"level":"info","ts":"2026-07-01T07:44:59.424Z","msg":"server-side apply completed","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"my-app","namespace":"flux"},"namespace":"flux","name":"my-app","reconcileID":"6827487b-c342-412f-b385-dbbeb4a62a76","output":{"Deployment/sample-app-flux/sample-app":"configured","Service/sample-app-flux/sample-app":"unchanged"},"revision":"master@sha1:3d0c7b5297ed5a30c2d65e6062e45113ebe1195f"}
{"level":"info","ts":"2026-07-01T07:44:59.445Z","msg":"Reconciliation finished in 91.709415ms, next run in 5m0s","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"my-app","namespace":"flux"},"namespace":"flux","name":"my-app","reconcileID":"6827487b-c342-412f-b385-dbbeb4a62a76","revision":"master@sha1:3d0c7b5297ed5a30c2d65e6062e45113ebe1195f"}
[oracle@AP1220431170472 sample-app-deployment]$ flux get all -n flux
NAME REVISION SUSPENDED READY MESSAGE
gitrepository/my-app master@sha1:3d0c7b52 False True stored artifact for revision 'master@sha1:3d0c7b52'
NAME REVISION SUSPENDED READY MESSAGE
kustomization/my-app master@sha1:3d0c7b52 False True Applied revision: master@sha1:3d0c7b52

Flux is quite easy to apply and could be use especially in non-production environments.

GitOps with ArgoCD – deployment upgrade

In the previous post (link), we installed ArgoCD, which serves as our GitOps operator in Kubernetes.
In this post, we will perform a simple application update and examine the actions ArgoCD takes to update the application.
Let’s start with a simple change to the application’s source code.

[oracle@AP1220431170472 ~]$ git clone https://github.com/zizu1985/sample-app-deployment.git
Cloning into 'sample-app-deployment'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 17 (delta 3), reused 2 (delta 2), pack-reused 9 (from 1)
Receiving objects: 100% (17/17), 4.35 KiB | 4.35 MiB/s, done.
Resolving deltas: 100% (3/3), done.
[oracle@AP1220431170472 ~]$ cd sample-app-deployment/
[oracle@AP1220431170472 sample-app-deployment]$ cp deployment.yaml deployment.yaml.bak
[oracle@AP1220431170472 sample-app-deployment]$ sed -i 's/sample-app:v.*/sample-app:v0.1.1/' deployment.yaml
[oracle@AP1220431170472 sample-app-deployment]$ git diff
diff --git a/deployment.yaml b/deployment.yaml
index 5fc3833..a00a7e7 100644
--- a/deployment.yaml
+++ b/deployment.yaml
@@ -16,7 +16,7 @@ spec:
containers:
- command:
- /app/sample-app
- image: gitopsbook/sample-app:v0.1
+ image: gitopsbook/sample-app:v0.1.1
name: sample-app
ports:
- containerPort: 8080

It is time to commit the changes and update the source code in the repository.

[oracle@AP1220431170472 sample-app-deployment]$ git config --global user.name "zizu1985"
[oracle@AP1220431170472 sample-app-deployment]$ git add .
[oracle@AP1220431170472 sample-app-deployment]$ git commit -m "Upgrade with version v0.1.1"
[master 3ebff60] Upgrade with version v0.1.1
1 file changed, 1 insertion(+), 1 deletion(-)
[oracle@AP1220431170472 sample-app-deployment]$ git push
Username for 'https://github.com': zizu1985
Password for 'https://zizu1985@github.com':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 14 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 358 bytes | 358.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/zizu1985/sample-app-deployment.git
a301fbe..3ebff60 master -> master

Let’s check if the change has been detected by ArgoCD. Here is what I see in the CLI:

[oracle@AP1220431170472 sample-app-deployment]$ argocd app diff sample-app --refresh
===== apps/Deployment default/sample-app ======
119c119
< image: gitopsbook/sample-app:v0.1
---
> image: gitopsbook/sample-app:v0.1.1

This is also visible in the Web UI:

If we check details we notice deployment is out of sync (some may wonder why ReplicaSet is not checked? ReplicaSet is not a declarative controller and cannot be used independently in GitOps).

By default, an application in ArgoCD is not automatically synchronized, so the behavior described below is not surprising.

[oracle@AP1220431170472 sample-app-deployment]$ argocd app get sample-app
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: OutOfSync from (3ebff60)
Health Status: Healthy
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app OutOfSync Healthy deployment.apps/sample-app unchanged

Time to synchronize.

[oracle@AP1220431170472 sample-app-deployment]$ argocd app sync sample-app
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2026-06-30T09:40:37+02:00 Service default sample-app Synced Healthy
2026-06-30T09:40:37+02:00 apps Deployment default sample-app OutOfSync Healthy
2026-06-30T09:40:38+02:00 Service default sample-app Synced Healthy service/sample-app unchanged
2026-06-30T09:40:38+02:00 apps Deployment default sample-app OutOfSync Healthy deployment.apps/sample-app configured
2026-06-30T09:40:38+02:00 apps Deployment default sample-app Synced Progressing deployment.apps/sample-app configured
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (3ebff60)
Health Status: Progressing
Operation: Sync
Sync Revision: 3ebff60ea482631d1fa08d82305297f586126370
Phase: Succeeded
Start: 2026-06-30 09:40:38 +0200 CEST
Finished: 2026-06-30 09:40:38 +0200 CEST
Duration: 0s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Progressing deployment.apps/sample-app configured

Something doesn’t look right here…

We take a closer look at the second ReplicaSet created to perform the upgrade.

[oracle@AP1220431170472 sample-app-deployment]$ argocd app history sample-app
SOURCE https://github.com/zizu1985/sample-app-deployment
ID DATE REVISION
0 2026-06-29 11:20:20 +0200 CEST (a301fbe)
1 2026-06-29 11:20:45 +0200 CEST (a301fbe)
2 2026-06-30 09:40:38 +0200 CEST (3ebff60)
3 2026-06-30 09:42:36 +0200 CEST (3ebff60)
4 2026-06-30 09:42:42 +0200 CEST (3ebff60)

It is time to reset previous version.

[oracle@AP1220431170472 sample-app-deployment]$ git reset HEAD^
Unstaged changes after reset:
M deployment.yaml
[oracle@AP1220431170472 sample-app-deployment]$ git push origin +HEAD
Username for 'https://github.com': zizu1985
Password for 'https://zizu1985@github.com':
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/zizu1985/sample-app-deployment.git
+ 3ebff60...09d6663 HEAD -> master (forced update)
[oracle@AP1220431170472 sample-app-deployment]$ argocd app sync sample-app
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2026-06-30T09:57:42+02:00 Service default sample-app Synced Healthy
2026-06-30T09:57:42+02:00 apps Deployment default sample-app OutOfSync Healthy
2026-06-30T09:57:42+02:00 Service default sample-app Synced Healthy service/sample-app unchanged
2026-06-30T09:57:42+02:00 apps Deployment default sample-app OutOfSync Healthy
deployment.apps/sample-app configured
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (09d6663)
Health Status: Healthy
Operation: Sync
Sync Revision: 09d6663dcfa0f39b1a47c66a88f0225a1c3380bc
Phase: Succeeded
Start: 2026-06-30 09:57:42 +0200 CEST
Finished: 2026-06-30 09:57:42 +0200 CEST
Duration: 0s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Healthy deployment.apps/sample-app configured

Let’s see what this looks like in ArgoCD.

[oracle@AP1220431170472 sample-app-deployment]$ sed -i 's/sample-app:v.*/sample-app:v0.2/' deployment.yaml
[oracle@AP1220431170472 sample-app-deployment]$ git add .
[oracle@AP1220431170472 sample-app-deployment]$ git commit -m "Update application to version 0.2"
[master 0d0e814] Update application to version 0.2
1 file changed, 2 insertions(+), 2 deletions(-)
[oracle@AP1220431170472 sample-app-deployment]$ git push
Username for 'https://github.com': zizu1985
Password for 'https://zizu1985@github.com':
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 14 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 368 bytes | 368.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/zizu1985/sample-app-deployment.git
09d6663..0d0e814 master -> master
[oracle@AP1220431170472 sample-app-deployment]$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
[oracle@AP1220431170472 sample-app-deployment]$
[oracle@AP1220431170472 sample-app-deployment]$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
[oracle@AP1220431170472 sample-app-deployment]$ argocd app get sample-app
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (09d6663)
Health Status: Healthy
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Healthy deployment.apps/sample-app configured
[oracle@AP1220431170472 sample-app-deployment]$ argocd app get sample-app
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: OutOfSync from (0d0e814)
Health Status: Healthy
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app OutOfSync Healthy deployment.apps/sample-app configured
[oracle@AP1220431170472 sample-app-deployment]$
[oracle@AP1220431170472 sample-app-deployment]$ argocd app sync sample-app
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2026-06-30T10:02:13+02:00 apps Deployment default sample-app OutOfSync Healthy
2026-06-30T10:02:13+02:00 Service default sample-app Synced Healthy
2026-06-30T10:02:13+02:00 Service default sample-app Synced Healthy service/sample-app unchanged
2026-06-30T10:02:13+02:00 apps Deployment default sample-app OutOfSync Healthy deployment.apps/sample-app configured
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (0d0e814)
Health Status: Progressing
Operation: Sync
Sync Revision: 0d0e814dd277e02b484b575e2fd3786e3dfc43b9
Phase: Succeeded
Start: 2026-06-30 10:02:13 +0200 CEST
Finished: 2026-06-30 10:02:13 +0200 CEST
Duration: 0s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Progressing deployment.apps/sample-app configured
[oracle@AP1220431170472 sample-app-deployment]$ argocd app get sample-app
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (0d0e814)
Health Status: Healthy
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Healthy deployment.apps/sample-app configured

All ok. We see in UI we have ReplicaSet from previous failed upgrade.

And we see indeed new version of application is visible.

Someone will ask why I didn’t use rollback at the argocd rollback level. Because:

a) Rollback using git is GitOps flow best practice
b) Even you made rollback with ArgoCD you cannot avoid rollback on git level

ArgoCD rollback could be used in case of outage of production as quick fix.

GitOps with ArgoCD – Installation

GitOps is the de facto standard methodology used in the world of DevOps and microservices.

  • IDEMPOTENCY – operation can be performed any number of times and produce the same result. System is in the same state as it would be if you had performed the operation only one. But you performed numerous of time.
  • OBSERVABILITY – We gain an additional observability option that allows us to regularly compare the declared state with the actual state. This also enhances security when the application’s state differs from the intended one—could a malicious actor have compromised the system?
  • AUDITABILITY and COMPLIANCE – changes are declarative and stored in the version control system. For the same reason, it is much easier to achieve compliance for the environment.
  • DISASTER RECOVERY – rebuilding the environment is much simpler and faster. We deploy from source code. Of course, this applies to stateless applications. For stateful workloads, we need to look for other solutions (e.g., Firefly) or rely on well-established methods (snapshots, backups, and replication).

ArgoCD is one of the GitOps operators (alongside Flux and JenkinsX) available for Kubernetes. It offers numerous features that support large-scale environments while meeting the requirements of enterprise-grade business services. It serves as both a central GitOps platform and a solution that enables fully declarative deployment management. In this post, we will look at installing this tool on Oracle Kubernetes Engine, and in the next one, at a sample application and its upgrade.

We begin by creating a namespace and installing the ArgoCD resources. It is crucial to ensure the installation is performed in server-side mode. Server-side mode is a security mechanism in which changes to object values ​​are verified within the cluster’s control plane.

[oracle@AP1220431170472 ~]$ kubectl create namespace argocd
namespace/argocd created
[oracle@AP1220431170472 ~]$ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml --server-side
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io serverside-applied
serviceaccount/argocd-application-controller serverside-applied
serviceaccount/argocd-applicationset-controller serverside-applied
serviceaccount/argocd-dex-server serverside-applied
serviceaccount/argocd-notifications-controller serverside-applied
serviceaccount/argocd-redis serverside-applied
serviceaccount/argocd-repo-server serverside-applied
serviceaccount/argocd-server serverside-applied
role.rbac.authorization.k8s.io/argocd-application-controller serverside-applied
role.rbac.authorization.k8s.io/argocd-applicationset-controller serverside-applied
role.rbac.authorization.k8s.io/argocd-dex-server serverside-applied
role.rbac.authorization.k8s.io/argocd-notifications-controller serverside-applied
role.rbac.authorization.k8s.io/argocd-redis serverside-applied
role.rbac.authorization.k8s.io/argocd-server serverside-applied
clusterrole.rbac.authorization.k8s.io/argocd-application-controller serverside-applied
clusterrole.rbac.authorization.k8s.io/argocd-applicationset-controller serverside-applied
clusterrole.rbac.authorization.k8s.io/argocd-server serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-application-controller serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-dex-server serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-notifications-controller serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-redis serverside-applied
rolebinding.rbac.authorization.k8s.io/argocd-server serverside-applied
clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller serverside-applied
clusterrolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller serverside-applied
clusterrolebinding.rbac.authorization.k8s.io/argocd-server serverside-applied
configmap/argocd-cm serverside-applied
configmap/argocd-cmd-params-cm serverside-applied
configmap/argocd-gpg-keys-cm serverside-applied
configmap/argocd-notifications-cm serverside-applied
configmap/argocd-rbac-cm serverside-applied
configmap/argocd-ssh-known-hosts-cm serverside-applied
configmap/argocd-tls-certs-cm serverside-applied
secret/argocd-notifications-secret serverside-applied
secret/argocd-secret serverside-applied
service/argocd-applicationset-controller serverside-applied
service/argocd-dex-server serverside-applied
service/argocd-metrics serverside-applied
service/argocd-notifications-controller-metrics serverside-applied
service/argocd-redis serverside-applied
service/argocd-repo-server serverside-applied
service/argocd-server serverside-applied
service/argocd-server-metrics serverside-applied
deployment.apps/argocd-applicationset-controller serverside-applied
deployment.apps/argocd-dex-server serverside-applied
deployment.apps/argocd-notifications-controller serverside-applied
deployment.apps/argocd-redis serverside-applied
deployment.apps/argocd-repo-server serverside-applied
deployment.apps/argocd-server serverside-applied
statefulset.apps/argocd-application-controller serverside-applied
networkpolicy.networking.k8s.io/argocd-application-controller-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-applicationset-controller-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-dex-server-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-notifications-controller-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-redis-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-repo-server-network-policy serverside-applied
networkpolicy.networking.k8s.io/argocd-server-network-policy serverside-applied

Now we have to open access to argocd-server service and get the access URL.

[oracle@AP1220431170472 ~]$ kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
service/argocd-server patched

Initial admin password is stored as secret in Kubernetes cluster. We need it for initial login.

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
<your_initial_admin_password_is_here>

ArgoCD has two management components: the CLI and the Web UI. The CLI must be installed; the installation process is shown below.

root@AP1220431170472 ~]# curl -sSL -o argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
[root@AP1220431170472 ~]# chmod +x argocd
[root@AP1220431170472 ~]# sudo mv argocd /usr/local/bin/
[oracle@AP1220431170472 ~]# argocd version --client
argocd: v3.4.4+443415b
BuildDate: 2026-06-18T09:15:00Z
GitCommit: 443415b5527ac55366e0760c93ef0e1abd0cf273
GitTreeState: clean
GoVersion: go1.26.0
Compiler: gc
Platform: linux/amd64

Let’s get ArgoCD-server URL and logon (remeber to change password by using).

[oracle@AP1220431170472 ~]$ kubectl service argocd-server -n argocd --url
http://192.168.49.2:30450
http://192.168.49.2:31821
[oracle@AP1220431170472 ~]$ argocd login 192.168.49.2:30450
WARNING: server certificate had error: error creating connection: tls: failed to verify certificate: x509: cannot validate certificate for 192.168.49.2 because it doesn't contain any IP SANs. Proceed insecurely (y/n)? y
Username: admin
Password:
'admin:login' logged in successfully
Context '192.168.49.2:30450' updated

When hit http://192.168.49.2 in browser ArgoCD UI should looks like below:

Now time to deploy example application.

argocd app create sample-app \
--repo https://github.com/zizu1985/sample-app-deployment \
--path . \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: OutOfSync from (a301fbe)
Health Status: Missing
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app OutOfSync Missing
apps Deployment default sample-app OutOfSync Missing

Application is not synchronized with manifests by default. We have to perform manual synchronization.

[oracle@AP1220431170472 ~]$ argocd app sync sample-app
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2026-06-29T11:20:20+02:00 Service default sample-app OutOfSync Missing
2026-06-29T11:20:20+02:00 apps Deployment default sample-app OutOfSync Missing
2026-06-29T11:20:20+02:00 Service default sample-app OutOfSync Missing service/sample-app created
2026-06-29T11:20:20+02:00 apps Deployment default sample-app OutOfSync Missing deployment.apps/sample-app created
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (a301fbe)
Health Status: Progressing
Operation: Sync
Sync Revision: a301fbe40e35f908800e0e39567d245f8ca1d9b3
Phase: Succeeded
Start: 2026-06-29 11:20:20 +0200 CEST
Finished: 2026-06-29 11:20:20 +0200 CEST
Duration: 0s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app created
apps Deployment default sample-app Synced Progressing deployment.apps/sample-app created
[oracle@AP1220431170472 ~]$ argocd app sync sample-app
TIMESTAMP GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
2026-06-29T11:20:45+02:00 Service default sample-app Synced Healthy
2026-06-29T11:20:45+02:00 apps Deployment default sample-app Synced Healthy
2026-06-29T11:20:45+02:00 Service default sample-app Synced Healthy service/sample-app unchanged
2026-06-29T11:20:45+02:00 apps Deployment default sample-app Synced Healthy deployment.apps/sample-app unchanged
Name: argocd/sample-app
Project: default
Server: https://kubernetes.default.svc
Namespace: default
URL: https://192.168.49.2:30450/applications/sample-app
Source:
- Repo: https://github.com/zizu1985/sample-app-deployment
Target:
Path: .
SyncWindow: Sync Allowed
Sync Policy: Manual
Sync Status: Synced to (a301fbe)
Health Status: Healthy
Operation: Sync
Sync Revision: a301fbe40e35f908800e0e39567d245f8ca1d9b3
Phase: Succeeded
Start: 2026-06-29 11:20:45 +0200 CEST
Finished: 2026-06-29 11:20:45 +0200 CEST
Duration: 0s
Message: successfully synced (all tasks run)
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service default sample-app Synced Healthy service/sample-app unchanged
apps Deployment default sample-app Synced Healthy deployment.apps/sample-app unchanged

In ArgoCD WebUI we have also possiblity to view its state with details as we could find below.

And our sample application looks like below:

We have been set-up with ArgoCD and let’s check some deployment capabilities in next post.

Oracle database installation on RHEL9 and automation

You receive a ready-made set of software installation instructions and verify them on an existing server—and it works. But when it comes to automation, you feel like you have to start the work all over again, because there is still a lot missing to get everything up and running. Is this unusual? No, it’s a fairly common scenario.
I encountered this issue when installing the Oracle 19c database on Red Hat 9. Below are my findings and observations:

  • In 19c on RHEL9, the installation does not work correctly without a valid entry in /etc/oraInst.loc
  • 19c installations on RHEL9 must be split into two stages (DBCA for the database and NETCA for the listener and TNS)
  • 19c on RHEL9 entails an additional step: applying Database Release Update 19.22 to the Oracle Home.

The diagram below illustrates this well.

The first step involves installing the patch together with the Oracle software, while the second is a standard patch installation.

./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile ${ORACLE_HOME}/install/response/db_install.rsp \
-applyRU /opt/oracle/19_22_ORACLE_PSU/35943157 \
-applyOneOffs /opt/oracle/19_22_ORACLE_PSU/35926646 \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/opt/oracle/oraInventory \
SELECTED_LANGUAGES=en,en_GB \
ORACLE_HOME=${ORACLE_HOME} \
ORACLE_BASE=/opt/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
`DEC`LINE_SECURITY_UPDATES=true

I also had some fun with Oracle Inventory, where I had to clone it intelligently. But that’s more environment-specific than a generic problem…

Ansible and support for Python2 in automation

There are differences between Python 2 and Python 3. In automation, we often need to support multiple versions of various operating systems. This specific example focuses on two of them: RHEL7 and RHEL8.
RHEL7 comes with Python 2 by default, whereas the other uses Python 3.
We are assuming that upgrading Python 2 to a newer version is not an option.
Why might that be the case? There are many reasons—for instance, a Python upgrade in the environment might not have been tested, or there may be numerous applications running on RHEL7. If we look at Ansible’s Python support across its various components, we see that version 2.14 is the last one to provide such support:

We aren’t happy about being unable to use a newer version of Ansible due to that Python 2 dependency.
At the same time, we had to take action because we had a use case requiring automation support across all servers—specifically for Oracle databases. About 5% of the environment was still running RHEL7, but… An urgent business need arose, and upgrading Python wasn’t an option. We needed to perform several operations on those instances, but there were enough of them to make it worthwhile.


One idea for solving this problem is to add a `target_python_interpreter` parameter that passes the path to the Python interpreter Ansible should use. For example, in an Ansible role…

- set_fact:
target_python_interpreter: "/usr/bin/python3"
when: target_python_interpreter is not defined

And we continue to use it in the `vars` section of the tasks (despite numerous attempts, I was unable to set this variable as global).

We don’t need to configure this at the playbook level, as the variable is passed by default from the pipeline to the playbook and then to the role. At the pipeline level, we simply need to identify which version of RHEL is being used—that’s all. For instance, we can use the inventory to set the variable for the server.

ansible-playbook -i ./inventory ./ansible-playbook-oracle-db-create.yml \
target_python_interpreter="/usr/bin/python2"

Oracle 19c – Cardinality, Histograms and distributed queries

Histograms are a topic in the optimization of queries in the Oracle database around which many myths have arisen. Sometimes true, sometimes not. Histograms in their most standard form are used when our query uses predicates in the form of column operator constant . The histogram helps calculate the num_distinct and density statistics, which allow you to calculate the selectivity for a given column in the table. In other cases, it has a more indirect impact – e.g. for joins, incorrectly calculated selectivity may affect the selection of the order of joins.

Jonathan Lewis’s great book on the Oracle query optimizer mentions different selectivity calculated for predicates on a column depending on whether the table is local or remote. In Oracle, queries are called distributed queries. Does the problem still exist in version 19c? Let’s check it on the example of table t1, which has a skew column with highly dispersed values.
I start by creating a loopback link to remotely query the local PDB.

CREATE DATABASE LINK "DB0511_PDB1.SUB05080535420.ORADBVCN.ORACLEVCN.COM@LOOPBACK2"
CONNECT TO APPLICATION
IDENTIFIED BY "<PAAS>"
USING '//<DB_IP>:<DB_PORT>/DB0511_PDB1.SUB05080535420.ORADBVCN.ORACLEVCN.COM';

We will check four variants and check how cardinality will be calculated (=selectivity * number_of_rows):

  • local table with histogram
  • local table without histogram
  • remote table with histogram
  • remote table without histogram

Let’s start from first variation.

Zaczynamy od pierwszego.
begin
dbms_stats.gather_table_stats(
user,
't1',
cascade => true,
estimate_percent => null,
method_opt => 'for all columns size 75'
);
end;
/
explain plan SET STATEMENT_ID='SQL1' FOR
select count(*) from t1 where skew = 5;
select * from table(dbms_xplan.display('PLAN_TABLE','SQL1','ALLSTATS LAST +HINT_REPORT +COST'));

In output we have below execution plan.

And now 2nd variant – local table without histogram.

begin
dbms_stats.gather_table_stats(
user,
't1',
cascade => true,
estimate_percent => null,
method_opt => 'for all columns size 1'
);
end;
/
explain plan SET STATEMENT_ID='SQL2' FOR
select count(*) from t1 where skew = 5;
select * from table(dbms_xplan.display('PLAN_TABLE','SQL2','ALLSTATS LAST +HINT_REPORT +COST'));

We see that there is an order of magnitude difference (41 vs 1).
And what does it look like when we use our table as a remote table?

begin
dbms_stats.gather_table_stats(
user,
't1',
cascade => true,
estimate_percent => null,
method_opt => 'for all columns size 75'
);
end;
/
explain plan SET STATEMENT_ID='SQL3' FOR
select count(*) from t1@DB0511_PDB1.SUB05080535420.ORADBVCN.ORACLEVCN.COM@LOOPBACK2 where skew = 5;
select * from table(dbms_xplan.display('PLAN_TABLE','SQL3','ALLSTATS LAST +HINT_REPORT +COST'));

And last one.

begin
dbms_stats.gather_table_stats(
user,
't1',
cascade => true,
estimate_percent => null,
method_opt => 'for all columns size 1'
);
end;
/
explain plan SET STATEMENT_ID='SQL4' FOR
select count(*) from t1@DB0511_PDB1.SUB05080535420.ORADBVCN.ORACLEVCN.COM@LOOPBACK2 where skew = 5;
select * from table(dbms_xplan.display('PLAN_TABLE','SQL4','ALLSTATS LAST +HINT_REPORT +COST'));

So let’s summarize what we managed to observe.

Local table with histogramLocal table without histogramRemote table with histogramRemote table without histogram (4)
1412241

We obtain something indirectly from what was observed for version 10g – variant 2. For the remote table, selectivity is something intermediate between selectivity with a histogram (1) or without a histogram (41). So overall it’s a bit better than it was. The conclusion is that we must remember this when we suspect unusual data distribution in a remote table. This may impact more complex query plans.