need to create a Redis release, indicating that it generates 2 replicas - helm3

I am newbie in helm. I need help for get something like the image.
https://i.stack.imgur.com/pt5J5.jpg
First I make this:
$ helm create mychart
$ I open mychart and open the file values.yaml in replicaCount I put 3
$ helm install my-release ./mychart/
But the problem I don't get the same like the image.
What I can do?
Thank you!

I have the answer. Only I need put this:
$ helm install my-release bitnami/redis --set replica.replicaCount=2
Thank you!

Related

Can i modify the docker image provided by playwright to add custom node version

I was utilizing Playwright to test my frontend application at work, however, we use node version 16.15.0 specifically. But, while looking at the docker file by Playwright I see that they install the latest node version which is causing issues when running in CircleCi.
Does anyone have any ideas for a workaround? Would I have to create a custom docker image using Playwright's image to tackle this and install the correct node version?
Any help would be appreciated!
https://github.com/microsoft/playwright/blob/main/utils/docker/Dockerfile.focal.
https://playwright.dev/docs/docker.
Yes, that would be the way to go. The best way to go about this would be to patch the Dockerfile.focal with an ARG instruction. You will then be able to pass values to this argument with your docker build command. This is the best approach that will make maintenance easier. Edit the Dockerfile.focal and add this variable as:
# leave this blank or specify a default value.
ARG NODE_VERSION=
Then in docker build you can set the value for this as. The docker build command in the script on the repo will change as follows:
docker build --platform "${PLATFORM}" -t "$3" -f "Dockerfile.$2" --build-arg NODE_VERSION=16.15.0 .
This will inject this variable into the image when it is being built so you can have the correct version. Also, this will make it easier to maintain since you will not have to change the Dockerfile every time you upgrade the version of NodeJS in your image.
Now, finally, you can edit the build.sh script to use the version variable. You can edit the line 13 in the script to something like:
apt-get install -y nodejs="{NODE_VERSION}" && \
You can use apt search nodejs after running the setup script to verify the correct version of the package.

Must not run with sudo

Hi I am new in github actions and I am trying to create a CICD pipline using Github action. I am using a digital ocean droplet as my server and I am trying to create a runner as said in github->settings->actions
When I wrote the following command
./config.sh --url https://github.com/basobaasnepal/BasobaasWeb --token DFGFSDF234sf3fg45hd
I got this:
Must not run with sudo
I tried to change the from root user to non root user but didn't work. I also tried export {AGENT_ALLOW_RUNASROOT="1"} bur
Are you setting the right variable? I think you can set the RUNNER_ALLOW_RUNASROOT variable to get by this problem using export RUNNER_ALLOW_RUNASROOT=1, or you can provide it directly to the command:
RUNNER_ALLOW_RUNASROOT="1" ./config.sh --url https://github.com/basobaasnepal/BasobaasWeb --token DFGFSDF234sf3fg45hd

What does "poddisruptionbudgets.policy "zk-pdb" already exists" mean while installing with helm?

I've been following this tutorial for setting up dremio with k8s: https://www.dremio.com/tutorials/python-dremio-and-kubernetes/
when attempting to install using charts in https://github.com/dremio/dremio-cloud-tools/, I get the following error message:
Error: release mean-waterbuffalo failed: poddisruptionbudgets.policy "zk-pdb" already exists
What does this mean and how should one go about resolving it?
After you use helm install to install a chart first time and you want to reinstall it again for some reason then before running the helm install you can clean up the old installation using helm uninstall
Alternatively if you intend just to upgrade an existing chart installation with some changes you can use helm upgrade
Check the PDB using:
kubectl get poddisruptionbudgets zk-pdb
If found, delete it with:
kubectl delete poddisruptionbudgets zk-pdb

How to work efficiently locally with Kubernetes/Docker?

I am new with Docker and i just made my first test with Kubernetes locally (with Minikube), and it sounds promising!
Now i would like to know how we are supposed to work with these tools efficiently when working on the code.
With docker, i wasn’t very satisfy about the process but it wasn’t so bad:
I made a change in the code
I stop the container
I rebuild the image
I run the image again
I guess there are ways/tools to avoid to executes all theses steps manually but i was thinking about diving further later.
But now i work with Kubernetes/Minikube, here is what the developing process looks like:
I made a change in the code
I delete the pod
I rebuild the image
I save it as a tar archive, then loads it in minikube
Executing all of these steps everytime we make a change in the code slow down significantly the productivity.
Is there a way to optimize/automatize this process for every time we make a change in the code?
There's a bunch of third party tools our there to help with this such as Draft and gitkube.
I personally use draft, which creates a heroku like workflow which makes pushing new applications much easier.
Using Draft with minikube is fairly straightforward:
# enable some plugins
minikube addons enable registry
minikube addons enable ingress
# install helm
# depends on your workstation, I have a mac so:
brew install kubernetes-helm
# configure helm on your minikube
helm init
# install draft
brew tap azure/draft
brew install draft
draft init --auto-accept --ingress-enabled
# from your repo do:
draft create --app myapp
# run your app
draft up
More resources:
https://medium.com/#vittore/draft-on-k8s-part1-e5b046857df4
https://radu-matei.com/blog/real-world-draft/

Dynamically load a Ruby container in Docker

I'm setting up a Dockerfile for my Rails project. To do so, I'm loading the Ruby Docker container like this:
FROM ruby:2.2.3
My application already contains a .ruby-version file that's used everywhere else to set the version. I'd really love to avoid duplicating the version number in my Dockerfile. Essentially, I'd like to do something like this:
Ruby ruby:$(cat .ruby-verison)
The above command doesn't work. Is there some other way of accomplishing the same thing with Docker?
You could use RVM to accomplish this. It doesn't matter what docker image you use as long as it has rvm installed on it. Here is an example Dockerfile:
FROM yograterol:fedora-rvm
ADD 'your_script.sh' '/'
ADD '.ruby-version' '/'
RUN 'sh /your_script.sh'
And here is what your_script.sh could look like:
ruby_version=$(cat .ruby-version)
rvm install ruby-$ruby_version
rvm use ruby-$ruby_version

Resources