Tike container platform - FAQ
Question | Answer |
---|---|
Should I order a project for each application? Or one per team or something similar? | A project per application is preferable. If deemed necessary, a team can order a project just for testing different things. For your own testing Codeready Containers is also a possibility, it is a locally hosted OpenShift with a few limitations running on a single virtual machine. |
What is the container platform address? | On the front page Tike container platform "OpenShift console and cli" |
What should a Dockerfile look like? | When possible, RedHat UBI Images should be used as a base for containers. In addition the usage of Multi-stage dockerfiles is preferable so that the container will be as small as possible. Do note, that OpenShift forces the process, also within a container, to be run as a normal user even when the user is not defined in the Dockerfile. This is done automatically, and it could affect your applications behaviour. For testing/development you should use the USER definition to tackle some of these problems at an early stage. Examples: Example applications with Dockerfiles More information: 3.2 Container process UIDs in OpenShift |
How can OpenShift connect to GitLab? |
|
How can OpenShift connect to GitHub? |
|
Can I run a database in a container? | Technically yes, but you shouldn't. You would have to ensure that the database recovers from a cluster update. The IT Center has a centralized database service, where replicated and maintained databases can be ordered from. The database service offers SQL databases (Postgresql). If a centralized database service is unsuitable for your project, you could consider running a document database in a container. The container platform administration is not responsible for backups, fault tolerance etc. |
Kubernetes platform configurations for projects and version control. Is it necessary to version control my Kubernetes configurations for each project or application? | Yes. In practice you want to keep each application and project a separate entity, even if the configurations are almost identical. You can reduce the repetitiveness between different versions of the same application by for example using Helm templates. In principle, everything needed to run the application should be version controlled with a max distance of ~3 commands from production. Except of course secrets like tokens, passwords, etc. and inputting them to with the correct names to the project should be documented and scripted. |
Is it necessary to define Kubernetes configurations for each application? | Yes. Each application has its own Kubernetes manifests and the possible sharing of those between applications happens outside the cluster, for example using Helm templates. |
Should all YAML files for applications be version controlled? Is it better to deploy using the web console or with the terminal using CLI + yaml files? | Yaml files should be version controlled. The software could be first deployed using the web console and then the yaml files should be added to version control. By pulling the yamls, the containers could be deployed by editing the yaml files and by using the terminal CLI. With the yaml files, the app could be setup with a single command and the configs would be safe in the version control. |
How the get an application behind SSO ("Shibboloin") in OpenShift? |
|
What are the IP addresses for the container, if I want to open my virtual machine firewall to traffic from the container platform. | The container cluster virtual machines live in the following networks and the outward traffic from the containers looks to be originating from:
|
How to make sure, that the Pods for a Deployment are run on separate virtual machines? | With Pod Anti-affinities: The matchExpression in the above link can be shortened using a matchLabel: Example apiVersion: apps/v1 kind: Deployment metadata: name: frontend spec: replicas: 3 template: metadata: labels: app: frontend <=========== This label is given to all Pods spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - topologyKey: kubernetes.io/hostname <========= hostname in topology labelSelector: matchLabels: <========= matches labels (key-value pairs app: frontend <========= .... that are defined to be the same as template metadata.labels was given for Pods in this Deployment .... |
How to limit my service so that only certain IP-addresses can access it. | Set an annotation to your services Route using the key haproxy.router.openshift.io/ip_whitelist and a list as the value, consisting of whitespace separated IP addresses. More info here. |
How to tell which version of a program, for example a programming language, is installed to the container? How do I list all installed packages? | Using the web client click the Pod you wish to access, click on the Terminal tab and input the following to the terminal: # version of a program <program> --version # all packages ls /usr/bin/ |