ytyng.com

Latest Articles

Page 6
kubernetes
2022-06-19 14:42 (3 years ago)

I attempted to retrieve the source global IP address from HTTP requests through Kubernetes Ingress, but I ended up obtaining the IP address of Kubernetes' local network, which did not work as intended. After switching Kubernetes to MicroK8s and using its built-in Ingress controller, I was able to successfully retrieve the global remote IP address. This is a note on that experience.

kubernetes
2022-06-19 11:51 (3 years ago)

When using MicroK8s on a server, a separate image repository for ctr is created apart from the server's Docker image repository. Since MicroK8s uses this ctr, Docker-loaded images cannot be used directly. It is necessary to import the images using `microk8s ctr image import`.

kubernetes
2022-06-19 11:32 (3 years ago)

In the latest version of Kubernetes (around 1.25?), "apiVersion: extensions/v1beta1" is no longer supported. If you have written Ingress configurations using "extensions/v1beta1", applying them with "kubectl apply" will result in the error: error: unable to recognize "ingress.yml": no matches for kind "Ingress" in version "extensions/v1beta1" To resolve this issue, you need to update the "apiVersion" to "networking.k8s.io/v1".

DockerLinux
2022-06-12 02:55 (3 years ago)

When trying to use the `docker run` command with SSH arguments and encountering the message "ssh docker run the input device is not a TTY," you can resolve the issue by adding the `-t` option to the SSH command.

Shellscript(Bash/Zsh)
2022-05-28 07:29 (3 years ago)

How to use the `date` command to retrieve the timestamp of a file's last modification date. This article was written to determine tasks that have not been processed for a certain period and to issue an alert when opening the terminal on a Mac.

kubernetes
2022-04-22 13:24 (3 years ago)

How to write a simple host-to-IP address translation table, equivalent to the /etc/hosts file in an OS, in a Kubernetes manifest file.

PHP
2022-04-20 00:34 (3 years ago)

Here's an overview of a blog post in Japanese about constructing XML using SimpleXML in PHP and making a request with Zend Framework's HTTP Client, translated into English: --- In this blog post, the author explains how to build XML using SimpleXML in PHP and send a request with the HTTP Client from the Zend Framework. The article provides detailed steps and code examples to demonstrate the process. It covers the following key points: 1. Introduction to SimpleXML: A brief introduction to SimpleXML and its advantages for creating and parsing XML documents in PHP. 2. Constructing XML: Step-by-step instructions on how to build an XML structure using SimpleXML, including adding elements, attributes, and content. 3. Setting up Zend Framework's HTTP Client: An overview of installing and configuring the Zend Framework's HTTP Client to prepare it for making HTTP requests. 4. Sending the Request: Code examples showing how to use the HTTP Client to send the constructed XML as part of an HTTP request, including setting headers and handling responses. 5. Conclusion: A summary of the key points covered and additional tips for working with XML and HTTP requests in PHP. The post aims to provide a comprehensive guide for PHP developers looking to integrate XML handling and HTTP requests using these tools.

Python
2022-04-02 05:32 (3 years ago)

A script to open a website and log in to Google using Python Selenium

Django
2022-03-21 08:57 (4 years ago)

When creating unit tests in Django, there are times when you need a Request (WSGIRequest).

2022-02-04 07:45 (4 years ago)

Include something like `ENV HOME=/var/app` in the Dockerfile. The directory should be an appropriate one with the necessary permissions.

kubernetes
2022-01-26 03:43 (4 years ago)

Sure, I'd be happy to help. Could you please provide the Japanese blog article summary that you would like translated into English?

Pythonmac
2022-01-03 11:15 (4 years ago)

Although creating a lock file with `pipenv lock` on an Intel Mac works without issues, attempting the same on an M1 (Apple Silicon) (ARM) Mac results in an error and the lock file cannot be created. However, by running `arch -x86_64 zsh` to emulate an x86_64 environment using Rosetta, `pipenv lock` executes successfully.

AndroidFlutter
2021-12-26 13:14 (4 years ago)

AppLinks on Android is a feature that allows an app to be launched when navigating to a URL with "https://" in Android Chrome, provided the URL matches a specific pattern. Unlike traditional Deep Links, AppLinks identify the app through its signature, enabling secure information transfer to specific apps controlled within the domain. This article will detail the steps to enable this feature.

Android
2021-12-26 03:09 (4 years ago)

In Android development, there was an issue where the SHA256 fingerprint was not displayed when trying to generate a keystore and display the fingerprint using keytool. This issue can be resolved by specifying the correct options with keytool. If this problem occurs, it seems that the SHA256 fingerprint is being displayed in the place of the SHA1 fingerprint.

Django
2021-12-11 13:51 (4 years ago)

Here is the solution for resolving the ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' that occurs when running manage.py hoge in Django.

kubernetes
2021-12-11 13:28 (4 years ago)

When operating a container with the tag set to "latest" and the imagePullPolicy set to "Always" within a Pod's Deployment in Kubernetes, you need to run `kubectl delete pod` to reflect the latest code. By staggering the deletion of pods, you can avoid downtime.

mac
2021-12-11 12:11 (4 years ago)

When you want to use multiple external displays with an M1 Mac and are outputting the screen through a display adapter with a Display Link chip, notifications may not appear on your Mac. In such cases, go to "Notifications" in the settings and ensure that the checkbox for "Allow notifications: When mirroring or sharing display" is checked. If this checkbox is unchecked, notifications will not appear while using Display Link. Make sure to turn this checkbox ON.

2021-12-11 11:09 (4 years ago)

When trying to install dependencies with Pipenv, you may encounter an error message like "#error Apple Arm64 ABI requires ffi_prep_cif_var error: command 'clang' failed with exit status 1". This blog post provides solutions on how to address this issue.

2021-12-04 06:04 (4 years ago)

If you switch to an M1 Mac and encounter docker build failures, include --platform linux/amd64.

2021-11-27 09:43 (4 years ago)

This blog post introduces the installation process of nodebrew on an M1 Mac. It mentions that node-sass does not work on M1 Macs. Instead, if you use dart sass (sass package), note that it may not function properly with node versions 16 and above, so version 15 is recommended for stable performance.